question_score
stringclasses
21 values
title
stringlengths
6
119
question_userid
stringlengths
4
10
question_user
stringlengths
3
20
question_user_score
stringclasses
496 values
question_datetime
stringdate
2014-02-01 23:57:31
2023-04-02 01:40:15
question
stringlengths
0
11k
question_id
stringlengths
1
6
answer_count
stringclasses
8 values
answer_id
stringlengths
0
6
answer_score
stringclasses
18 values
answer_userid
stringclasses
946 values
answer_user
stringclasses
963 values
answer_user_score
stringclasses
692 values
answer_datetime
stringlengths
0
19
answer
stringlengths
0
10.7k
1
Confused on small script that changes jump height, Any ideas?
1073917569
Puppy_lovertheawsome
84
2023-02-28 07:42:13
<p>Hi I am struggling to make the <strong>Jump height</strong> increase when the <strong>The tool is equipped</strong>, any ideas on how this could be fixed?:</p> <pre class='brush: lua'>local Tool = script.Parent local Jump = 150 local NormJump = 50 Tool.Equipped:Connect(function() local humanoid = Tool.Parent:Fi...
133130
2
120219
2
524832183
nikitos54327
70
2023-02-28 12:38:27
<p>Your welcome!</p> <p>Explorer --> StarterPlayer --> Properties --> Character Jump Settings --> Character Use Jump Power = true</p> <p>If I helped you please mark my answer as best</p>
0
Why does roblox not load my images, no matter what method I use?
96185281
Dr_Luxxe
5
2021-01-27 02:37:14
<p>I have tried rbxassetid://, http://www.roblox.com/asset?id=, and others, and it won't load my images, even with preloading, waiting, etc. Here's my scripts.</p> <p>Local</p> <pre class='brush: lua'>local ProductList = require(script.ProductList) wait(.25) for i,v in pairs(ProductList.Products) do game:GetService...
119230
0
Mask Anchor to Unanchoring the Mesh doesnt work, Help?
657992828
waluigifaster8998
0
2020-11-22 15:37:06
<p>So im creating a script when a npc loses about 5.2k health, the mask drops off, But i dont even know how do i make a action when the mask is dropped and how do i increase the speed of the NPC when it goes 2nd phase.</p> <p>Here's the script.</p> <pre class='brush: lua'>if local FrozenGiant.Health = 5200 then Froz...
116156
0
Too many 'upvalues' in function, Alternatives possible?
55375503
Adrian12094
12
2017-10-26 01:11:41
<p>So basically I've been trying to make <strong>a system with 61 light switches</strong> (with FilteringEnabled) that can be switched on/off across a map. The problem is that I tried many possibilities in order to make this function properly. So I tried this method, but it returns an error indicating that the function...
48897
1
49075
2
71379989
whenallthepigsfly
541
2017-10-26 04:10:46
<p>First, if you have many similar objects, it's a great idea to put them all in an array. This allows you to access a light switch based on it's number in the array, like so:</p> <pre class='brush: lua'>local lightSwitches = {workspace.LightSwitch1, workspace.LightSwitch2, workspace.Lig...
0
My &quot;E To Get In Vehicle&quot; Proximity Prompt Wont Work With Driver Seats?
124136116
ricelicker
52
2021-02-08 23:45:49
<p>The Title Pretty Much Explains Everything. It Works Perfectly Fine With Normal Seats, But It Wont Work With Driver Seats And I Am Not Sure How To Fix It.</p> <p>This Is The Script That Runs The Proximity Prompt</p> <pre class='brush: lua'>local proximityPrompt = script.Parent local seat = proximityPrompt.Parent seat...
119845
0
Display an IntValue with a GUI when the Player touches a Part?
1330900
Beachbum395
20
2014-02-24 01:43:28
<p>How can I make it so when you hit a Block with an IntValue a GUI pops up with the Value of the IntValue? By the way, the IntValue changes its value every time you press it.</p> <p>This is what I have that doesn't work:</p> <pre class="brush: lua">script.Parent.Handle.Touched:connect(function(hit) hit.IntValue.Value....
272
0
There's an error when a tower attacks?
568181883
epet6644
0
2022-07-31 17:50:02
<p>so when my tower try's to attack an error comes up in the output and I doesn't attack nether does it play the animation</p> <p>here's the error</p> <p>13:38:55.037 ServerScriptService.Main.Tower:51: ServerScriptService.Main.Tower:15: attempt to index nil with 'HumanoidRootPart' - Server - Tower:51 13:38:55.037 Stack...
131032
0
Why does my output say &quot;Workspace.Doors.Model.Main:5: attempt to index nil with 'Character'&quot;?
82150455
Garnetpj2007
0
2020-09-13 19:58:07
<p>I'm trying to make an animated E to open door script, but when I try to press e, on the output, it displays the error: "Workspace.Doors.Model.Main:5: attempt to index nil with 'Character'". Here is the script below:</p> <pre class='brush: lua'>local Can = true local Open = false script.Parent.Event.OnServerEvent:Con...
113129
1
spawning in object based on value in &quot;if&quot; statement not working?
454915
nick2222
9
2020-07-14 01:58:25
<p>so im trying to make a boss appear when the wave value reaches a certain number. but nothing happens and my output isnt giving me any error messages. what gives?</p> <pre class='brush: lua'>if game.ReplicatedStorage.Values.Wave.Value == 2 then game.ReplicatedStorage.BOSS.Zombie:Clone().Parent = game.Workspace en...
109005
1
100106
0
310835382
MPforfun
89
2020-07-14 07:59:39
<p>Okay so I think I have fixed your script.</p> <p>:GetPropertyChangedSignal is very useful when using values.</p> <p>every time the value updates for example it increases by one, the event will fire.``</p> <pre class='brush: lua'>local Wave = game.ReplicatedStorage:WaitForChild("Values").Wave local clone = game.Repli...
18
Does anybody have specific information about these Humanoid Limitations?
15631081
Uglypoe
557
2017-05-11 14:39:47
<p>Hi. This is probably a different question than you're used to seeing on this site, but I've been recently having an issue in my game revolving around the Roblox Humanoid. I've found that there appears to be several hidden limitations with it that can stop developers (such as myself) from creating very complex and in...
42824
0
How do I lag script &quot;search&quot; if the script is [UNKNOWN] in developer console?
37092313
tim458458
29
2018-04-22 17:05:22
<p>Hello, so I own a group. I barely use FM-scripts and it's not a virus but sometimes in some servers the servers SPIKELAG ALOT. In developer console there is a [UNKNOWN] script going red in script activity.</p> <p>What can this [UNKNOWN] script be? Please help if possible.</p>
57252
1
why isnt my projectile system damaging ontouch?
1865523181
pakancina
19
2022-09-03 18:05:16
<p>ok. i made a script that lets you shoot projectiles when you press the key "e" now i need the projectiles to damage npcs on touch. i tried putting every damage script out there in the projectile, nothing worked. heres the script:</p> <pre class="brush: lua">local sound = script.fire local tweenservice = game:GetServ...
131488
1
New at datastores, can someone fix up the script for me?
103546581
CraftyAlphaMan
9
2022-06-19 02:46:15
<p>It's for stands datastore in a jojo fighting game. Help please.</p> <p>I've only tested it on the 1 button but I don't know the issue.</p> <pre class='brush: lua'>script.Parent.Parent.Parent.CharacterAdded:Wait() local stands = game:GetService("DataStoreService"):GetDataStore("yoyosall") local standsdata = nil local...
130400
0
Script doesn't recognize usernames if in all lowercase?
328413134
LiLFriks
35
2020-08-02 04:16:33
<p>Hello! I have a whitelist script for my game. The problem is, it doesn't work unless the username is written with every capital letter in the username. For example, it wouldn't work if somebody's username is "RobloxGirl" and I put "robloxgirl" in the script. It just kicks the player if I don't put the name 100% corr...
110522
1
101509
1
1222281551
botw_legend
424
2020-08-02 04:26:47
<p>you can make every letter in a string lowercase by using <code>string.lower(string)</code> hope this helped! tell me there are any errors</p>
1
My Tool For A Firing Projectile Not Working? (SOLVED PLEASE CLOSE)
15454657
GreekGodOfMLG
244
2015-06-28 02:18:57
<p>Hello and thank you for taking you time to look at my question, I'll get straight to the point; My local script which is inside StarterPack and the parent of the local script is named pistol which used to be tool. I also have a part in the tool, which is pistol and the part is called Handle, and it has a mesh in it....
19025
1
22609
4
38498021
capinbuilda
15
2015-06-28 02:41:53
<p>Local needs to be lowercased on line 10. Try this script:</p> <pre class='brush: lua'>Player = game.Players.LocalPlayer Gun = script.Parent Ammo = 5 function Shoot() if Ammo &gt; 0 then local Bullet = Instance.new("Part", Workspace) Bullet.Shape = "Ball" end end </pre> <p><strong>Why this gav...
0
How do I make that the value would go down by 1 every second?
95673436
JoneXI
56
2020-09-06 12:15:38
<p>Hello, how do I make that the value would go down by 1 every second?</p> <p>Script:</p> <pre class='brush: lua'>while can.Value == true do wait(1) if player:FindFirstChild("Cooldowns") then if player.Cooldowns.A1.Value &gt; 0 then player.Cooldowns.A1.Value = player.Cooldowns.A1.Value - 1 ...
112783
0
Tween All Children in For Loop (with animation)?
267033282
rizallesantiago
0
2022-07-30 09:26:48
<p>Hi! I have this script that plays an Animation and gives you a tool. The tool you acquire is from a crate, and I want to tween some cool fading thing. However, I could've used unions, but it was <strong>too glitchy</strong> and left some parts. So, I tried using a <strong>for loop to gather every part in my crate an...
131009
0
Datastore not working. Not loading data and/or saving?
402175389
famousvilliger1
0
2022-05-12 15:14:54
<p>Sometimes it saves to the storage but when i join it doesnt load. anyone know?</p> <pre class="brush: lua">local dataStoreService = game:GetService("DataStoreService") local dataStore = dataStoreService:GetDataStore("LevelStorage") game.Players.PlayerAdded:Connect(function(plr) local leaderstats = Instance.new("...
129977
1
What's the difference? I just started scripting so don't judge.
1301982222
hussinhd5
7
2022-11-17 15:49:50
<p>What's the difference between</p> <p><code>local Something = Something2</code> and <code>Something = Something2</code></p>
132301
2
119493
0
1060251348
sergeant_ranger
114
2022-11-17 17:16:05
<pre class='brush: lua'>local something1 = something2 </pre> <p>creates something called a local variable. That means that only the function, or part of code that this line is in can actually access this variable. This is really useful if you need to have a lot of variables that might have the same name but need to hav...
0
Why wont the fireball do any damage?
471191021
Sabertooth11123
38
2021-05-06 20:35:23
<p>I have a tool that when activated will shoot a fireball and when that collides with a player it will deal damage to the targets humanoid. This is a simulator game (like superpower training simulator) so the damage of the fireball will be different depending on the players fist strength but for some reason it doesn't...
123178
1
112268
1
371637657
ssgmalachi
52
2021-05-07 02:15:30
<p>There's lots of things about this code that is incorrect, but I'll go over the main topic</p> <pre class='brush: lua'>-- replace this for lines 32 - 35 if hit.Parent:FindFirstChild("Humanoid") then hit.Parent.Humanoid:TakeDamage(Player.Data.Strength.Value) end </pre> <p>If this doesnt work, reply, I'll rewrite a com...
0
Local Script fires server and plays animation on all players. How do I fix this?
149094523
Crimsonknightzone
38
2021-02-22 04:54:03
<p>I have been trying to make an infection game and I am starting off with the infect script. Whenever a player steps on a hazard they should be "infected". However, in recent tests, all attempts have ended up in all players in the server having the infect sequence play out. I have no clue on how to stop this. Anyone k...
120498
1
109882
1
124281858
DeceptiveCaster
3513
2021-02-22 12:52:42
<p>There is a flaw in your LocalScript. Instead of fetching the player from the part given by Touched, you're referring to <code>LocalPlayer</code>. There is no guarantee that the <code>LocalPlayer</code> is the one touching the puddle, and because you're assuming that they are, every player experiences the same animat...
0
How do I know if the player copied text?
424946127
MiAiHsIs1226
104
2021-05-02 19:12:20
<p>So I need help on knowing if a player copies text</p> <p>I use UserInputService but it didn't work</p> <p>Can anyone help me?</p> <pre class='brush: lua'>if UIS:IsKeyDown(Enum.KeyCode.C) == true and (UIS:IsKeyDown(Enum.KeyCode.RightControl)) then print("The Player copied text!") end </pre>
123039
2
112109
1
94006350
BulletproofVast
370
2021-05-02 19:35:20
<p>https://developer.roblox.com/en-us/api-reference/class/UserInputService</p> <pre class='brush: lua'>local UserInputService = game:GetService("UserInputService") UserInputService.InputBegan:Connect(function(keyPressed, other) if other then return end -- if typing then stop script (remove if u want) if keyPres...
0
Nothing past the parts variable parses when running my ability script?
1674805834
Black_Magic2533
104
2023-03-17 18:01:40
<p>Im trying to make a simple ability (note i made it so the player is detected on purpose for debugging)</p> <p>Script in ServerScriptService</p> <pre class="brush: lua">local ReplicatedStorage = game:GetService("ReplicatedStorage") local SecularDirectory = ReplicatedStorage.Abilities.Secular SecularDirectory["Soul Pi...
133204
3
Working, but not working?
1924093
ChiefWildin
295
2014-03-10 03:35:31
<p>The following code is supposed to generate a 'Ghost' (model) based on the camera's coordinate frame. The ghost model appears in the game, but it doesn't move at all from the original position it was in when I made it.</p> <p>What happens is a new camera called <code>LocalBin</code> is created (a container for my loc...
604
1
958
3
4030068
jobro13
980
2014-03-10 12:30:33
<p>Your code is almost correct! However, welds will not work if one or both of the parts are anchored. Unanchor the weldBrick on line 19 and see if that works. As you are using render stepped, my guess is that it works.</p> <p>However, what would be even better is to just move the Ghost model every frame to the right C...
0
I got error attempt to perform arithmetic (sub) on Vector3 and number?
1722430189
jeremqpmfpi
41
2021-07-19 02:48:59
<p>i am trying to dupe a object but it is not working</p> <pre class='brush: lua'>local bullet = script.Parent.bullet local dupes_of_bullet = bullet.bullets.Value local turret_assaigned = bullet.turret_assaigned.Value local bullet_clone = bullet:Clone() local bullets_existing = bullet.bullets_existing.Value local next_...
125480
1
114202
3
25483747
appxritixn
2234
2021-07-19 03:44:36
<p>You can't <em>subtract</em> a number from a <strong>non-number</strong> value.</p> <p>If you want to decrease a value from a Vector3 value, there are two ways that I would suggest:</p> <p><strong>Option 1:</strong></p> <pre class='brush: lua'>local Result = next_pos - Vector3.new(1,0,0) </pre> <p>That will subtract ...
1
How do I give players shirts, pants and a hat?
53537032
Aesthetical
100
2014-03-01 05:12:47
<p>Generally speaking, how would you give a player these things via scripting?</p>
382
0
How do you change player walkspeed based on leaderstat?
103466946
kimbriel
19
2022-11-23 18:10:54
<p>For example if a players leaderstat equals to 10, the player will have 10 walkspeed.</p>
132355
0
Pathfinding script won't work when the zombie model Is cloned (?)
1961959172
imnotaguest1121
89
2022-06-21 17:18:59
<p>Anyway, so there Is a problem with my zombie model, as the title says, the pathfinding doesn't appear to work when the zombie model (A R6 model) was cloned In say, replicated storage, It does work when not being cloned, I was wondering why thats happening</p> <p>script:</p> <pre class='brush: lua'>local NPC = script...
130440
2
What are the .spec descendants of game?
124281858
DeceptiveCaster
3043
2019-03-02 14:47:47
<p>I ran a <code>for</code> loop through <code>game</code> like this:</p> <pre class='brush: lua'>for _,d in pairs(game:GetDescendants()) do print(d) end </pre> <p>It gave me every descendant of game (over 1,800, apparently) and within that group were things ending in <code>.spec</code>. These "things" appear to be...
77086
3
73200
4
12825194
InfinityDesign
275
2019-03-30 12:50:08
<p>These are unit test modules using <a target="_blank" href="https://github.com/Roblox/testez">TestEZ</a>. TestEZ will automatically execute any files suffixed with <strong>.spec.lua</strong> or Roblox modules suffixed with <strong>.spec</strong>.</p> <p>The globals <strong>describe</strong>, <strong>it</strong>, and ...
0
How do I get a Player's Chat Color?
21190567
Kratos232
105
2015-01-13 06:40:48
<p>Hi. I'm making a custom chat GUI, and I want the Player's Name to be the same as their name would be with the normal ROBLOX chat system, but I need it to be a GUI. How would I get what color their name is? I have the GUI and everything, but I just can't get the Color.</p>
14202
0
Button Works once not multiple times? &quot;parent property locked&quot;
1609610586
Iownrobloxp
44
2021-09-19 19:35:48
<p>So I have this button that grabs a tool from a folder than puts it into the starter pack (there are 30 tools in folder). and it only works once, I dont know why could anyone help?(ColdFoxy07 if you answer this again big susy)</p> <pre class='brush: lua'>local cooldown = false --//r local button = script.Parent local...
127560
0
Can a LocalScript Run in the Workspace?
9892401
sidekick83
80
2015-07-16 23:21:03
<p>Wondering if a LocalScript can run in a Workspace. Given that the Workspace is global for each client, I was wondering something Local would be able to function in something global.</p>
19944
2
23540
2
5820674
woodengop
1133
2015-07-16 23:44:01
<p>A localscript can <em>only</em> run in three places, StarterGui, Player's Backpack, and the Player's Character, So, in other words, the answer is <em>No</em> a localscript can <strong>Not</strong> run in Workspace.</p>
0
How do I Randomly Rotate a Part?
86688415
crgutierrez
0
2020-05-17 03:20:38
<p>Hello,</p> <p>How do I make a part randomly rotate.</p> <p>Iv'e been trying to figure this out for a while yet haven't found any tutorials of scripting help.</p> <p>Help would be much appreciated.</p> <p>Thank you</p>
103432
0
Why is my remote event not getting received?
503062933
NotConnorRandumb
22
2023-01-06 21:24:47
<pre class="brush: lua">local tool = script.Parent local detector = script.Parent.Handle.ClickDetector local function pickup(player) script.Parent.Pickup:Play() tool.Handle.Anchored = false tool.Name = "Crowbar" tool.Parent = game.Workspace[player.Name] game.Workspace.BasementDoor.DoorBasement.Proxi...
132770
0
What's the difference between Global and regular datastore?
556201097
YabaDabaD0O
485
2018-07-05 21:20:15
<p>Can someone please explain what the difference is between GetGlobalDatastore and GetDatastore?</p>
61897
0
Uesrinput printing twice even tought there is a debounce?
55310986
hokyboy
264
2021-06-07 21:52:19
<p>My print printes twice even tough there is a debounce it should only fire once else my script will kinda glitch</p> <pre class='brush: lua'>local Debounce = false uis.InputBegan:Connect(function(input) if Debounce == false then if input.KeyCode == Enum.KeyCode.Space then Debounce = true print...
124180
0
GUI button not spawning a part?
1961959172
imnotaguest1121
52
2022-05-08 17:58:40
<p>So I am making a tool that has a GUI appear each time the tool Is equipped and then disappear when the tool Is unequipped, when you click on the GUI It creates a ball that rolls around damaging and also turning people Into stone, the problem Is that for some reason the GUI doesn't spawn a ball</p> <p>(Btw In order f...
129960
0
How could the math.noise function be used for efficient 3d terrain?
61716444
theking48989987
2141
2019-01-26 01:16:19
<p>So, in the past week, I have been experimenting around with <code>math.noise</code> in generating terrain, first by just using it to generate smooth looking hills, which went well, then to making voxel terrain, which did not go as well.</p> <p>The first code I tried out was the following:</p> <pre class='brush: lua'...
75151
0
How to control airplane with mouse?
332406325
TinyScorpion10
0
2022-08-07 21:00:52
<p>I am trying to make a basic airplane that uses the player's mouse to steer the vehicle. I've tried for hours but I can't find any solution...</p> <p>I have only figured out how to move one part using my mouse, I can't get the plane models' children (every part of the plane) to move according to its speed and the mou...
131135
1
.Touched, lag or incorrect firing?
1788996
Jackd44
35
2014-03-11 10:20:45
<p>Hello, I have recently been in development of my new place. And I have a very simple kill brick that has this code;</p> <pre class="brush: lua">function Kill(Plr) game.Players:GetPlayerFromCharacter(Plr.Parent).Alive.Value = false Plr.Parent:BreakJoints() end script.Parent.Touched:connect(Kill) </pre> <p>The...
631
2
994
1
25691148
FromLegoUniverse
264
2014-03-11 11:59:52
<p>You need to add a debounce, which can be done two ways, a debounce or checking the value in Alive. I am on my phone, so I will post a better version once I get to a computer.</p> <pre class="brush: lua"> function Kill(Plr) if game.Players:GetPlayerFromCharacter (Plr.Parent).Alive.Value==true then game.Pl...
1
How do I define players through a regular script?
169428835
Cynical_Innovation
595
2020-04-10 01:42:57
<p>So I always struggle define players through regular scripts. When you use a local script, you just use <code>local player = game.Players.LocalPlayer</code> but, I need to do this through a regular script. Is it even possible?</p>
98697
1
91203
5
251936426
youtubemasterWOW
2741
2020-04-10 01:48:37
<p>You can use multiple things like using a ClickDetector,<code>ClickDetector.MouseClick:Connect(function(player)</code>, the PlayerAdded event, <code>Players.PlayerAdded:Connect(function(player)</code>, the GetPlayerFromCharacter function, commonly used with the Touched event of a part, <code>Players:GetPlayerFromChar...
0
how do i make my projectile launch?
1865523181
pakancina
19
2023-02-01 11:01:35
<pre class='brush: lua'>Tear = game.ReplicatedStorage.tear local plr = game.Players.LocalPlayer UserInput = game:GetService("UserInputService") UserInput.InputBegan:Connect(function(input , gameProccesedevent) if input.KeyCode == Enum.KeyCode.E then local tearclone = Tear:Clone() tearclone.Parent = ...
132992
1
120110
0
559514967
T3_MasterGamer
2189
2023-02-02 10:38:22
<p>Use the <a target="_blank" href="https://create.roblox.com/docs/reference/engine/classes/BasePart#AssemblyLinearVelocity"><code>AssemblyLinearVelocity</code></a> property.</p> <pre class='brush: lua'>local Tear = game.ReplicatedStorage:WaitForChild("tear") local plr = game.Players.LocalPlayer local UserInputService ...
0
How do I make multiple parts inside an accessory visible?
1902553017
hndcwffs
5
2022-08-02 13:03:08
<p>I have a character creation script but only makes the handle visible, I tried replacing the line of code about handle with :GetDescendants() and it didnt work.</p> <pre class='brush: lua'>local MaleTable = require(game.ReplicatedStorage:WaitForChild("MaleHairModule")) script.Parent.Hair.Changed:Connect(function() ...
131062
0
So when I do a touched event, it errors out, why?
1122600033
ABCTrainerDude
14
2020-11-22 14:19:42
<pre class='brush: lua'>if meleebool == true then if RArm.Touched:Connect(function(hit) then if hit.Parent.Humanoid then hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health -12 end end) if LArm.Touched:Connect(function(hit) then if hit.Parent.Humanoid then ...
116154
2
106596
0
1751062389
TheEagle722
99
2020-11-22 14:30:42
<p>local events are NEVER can be in if.. then. try just removing if's and then's.</p> <pre class='brush: lua'>if meleebool == true then RArm.Touched:Connect(function(hit) if hit.Parent.Humanoid then hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health -12 end end) LArm.Touched:Con...
0
Group Only Spawn?
88109453
ken12345678900000000
0
2015-07-17 16:26:46
<p>I have a place for a group and i would like Group only spawns. What script should i use? or what do i need to have to scripting that? i am new to all of this so plz help. What do i need to do for this kinda script?</p>
19985
3
23581
3
29413559
alphawolvess
1784
2015-07-17 16:53:33
<p>To do this, you would need two spawns. One cannot have an AutoAssignable team. Then, you would want to use the <code>PlayerAdded</code> event and use <code>:IsInGroup(Group Id)</code> to see if that player is in the group. If the player is not in the group, leave them in that original spawn, however, if the player i...
0
A text in a sign wont show the username of the player looking at it How do i fix this?
721762704
TheForgottenScript
2
2021-09-14 18:52:14
<p>I made a script in a sign with a textlabel and put the script in it containing this:</p> <pre class='brush: lua'>local name = game.Players.LocalPlayer.Name script.Parent.Text = ("Thanks to "..name.." for playing the game!") </pre> <p>but I keep getting the error : Workspace.Spawn.Sign.Text.SurfaceGui.TextLabel.Scrip...
127439
1
115625
0
34716028
cmgtotalyawesome
1308
2021-09-14 19:07:03
<p>The problem is that you are not using a local script. <code>LocalPlayer</code> can only be accessed in a local script. You will have to go about this in another way. I'm not sure how you are going to choose whos name you want to display, but here is a script that will display the name of the most recent player to jo...
0
For loop waits until functions finishes?
538824226
Brioche_Noodle
45
2022-08-02 11:36:48
<p>So I'm making a train and I want the doors to open but it opens the left door first then the for loop waits for that to open and close then open the right door after and I want both of them to open both at once :/</p> <p>Main Script to activate Event</p> <pre class='brush: lua'>while true do Event:Fire() -- Fire...
131059
1
118400
1
953256806
SEAN_YT213
139
2022-08-02 11:55:29
<p>Use delay:</p> <pre class='brush: lua'>function Doors(v) if v.Name == "DoorL" then print("DoorL") TweenService:Create(v, doortweenInfo, {CFrame = v.PosOpen.CFrame}):Play() print("Opened") delay(5, function() TweenService:Create(v, doortweenInfo, {CFrame = v.PosClosed.CFram...
0
Which style is best?
55811169
ZeptixBlade
215
2014-11-28 23:50:11
<p>I've seen,</p> <pre class='brush: lua'>myvariablename = "String" </pre> <p>I've seen,</p> <pre class='brush: lua'>MyVariableName = "String" </pre> <p>I've seen,</p> <pre class='brush: lua'>myVariableName = "String" </pre> <p>I've seen,</p> <pre class='brush: lua'>my_variable_name = "String" </pre> <p>I know these al...
12836
3
15874
2
9822618
KarlXYZ
120
2014-11-29 00:01:42
<p>I wouldn't say there is a "best" way to format your variables. I guess it's just down to personal preference.</p> <p>I'll tend to use myVariableName (First word is lower-case, rest are upper-case).</p>
0
Touched event doesnt work as proper as i want?
1751062389
TheEagle722
114
2020-11-23 19:04:56
<p>Here is my script.</p> <pre class='brush: lua'>local part1 = nil script.Parent.RemoteEvent.OnServerEvent:Connect(function(LPx1) if LPx1.Character.Humanoid then script.Parent.Wedge.Touched:Connect(function(xy) if part1 ~= nil then print('hi') --it is supposed to print it only once ...
116218
1
106648
1
1818718041
R_alatch
394
2020-11-23 19:44:08
<p>Try disconnecting the event after the part is touched.</p> <pre class='brush: lua'>connection = script.Parent.Wedge.Touched:Connect(function(xy) if part1 then print("Part touched") end part1 = xy.Parent connection:Disconnect() end) </pre>
0
How can i make a preview of what i am placing?
816236594
BashGuy10
379
2019-08-26 15:05:12
<p>Hello people of the internet! I recently started to make a sandbox tycoon game, i want to know how to make a preview. (Also, if you could keep it usable with my currentbuilding setup.)</p> <p>I've done a bit of research, and couldn't find a way to do it. Thanks in advance!</p> <p><a target="_blank" href="https://gya...
86541
1
80205
1
2479393
Dfzoz
345
2019-08-26 17:42:01
<p>Before you copy and paste the code: create two RemoteEvents on Placement.Remotes, one named "MovePreview" and the other "CreatePreview". At least try to understand what I wrote. Its quite a big Code:</p> <p>Server Script Code:</p> <pre class='brush: lua'>local place = game:GetService("ReplicatedStorage").Placement.R...
0
I need help with inf map gen I can't find anything on how to do inf map gen with models?
72097822
AIWally
0
2022-06-22 22:16:02
<p>I've been trying to find out how to make an inf Generation Script but it's like a random model from a folder but can't find out how to do inf gen with models and parts</p>
130469
0
&quot;FindPartOnRayWithIgnoreList is not a valid member of DataModel 'Baseplate'&quot; How do I fix this?
417031766
LiamQ926
7
2022-08-01 20:30:53
<pre class='brush: lua'>--Variables local player = game.Players.LocalPlayer local char = player.Character local RunService = game:GetService("RunService") --MainScript char.Humanoid.CameraOffset = Vector3.new(0, 0, -1) for i,v in pairs(char:GetChildren()) do if v:IsA("BasePart") and v.Name ~= "Head" then v....
131049
0
How to add player to a team?
598121696
Fefefefe234
0
2019-03-23 15:53:04
<p>I'm creating game wheree I want to add to team someone when they joined the game. But how? Wwhen I'm adding myself in Developer team, when I pressed start, my team changed to "Survivor"(this is basic team). Help, please. Script or something else. Also, can I know where I need put script, local or no.</p> <pre class=...
78006
0
How do I fix a 'Error while processing packet' error?
87067784
RGames1234
22
2020-08-01 03:26:14
<p>I'm currently trying to fix the <a target="_blank" href="https://www.roblox.com/catalog/139586244/Cloud-9-Snowboard">Cloud 9 Snowboard</a> for a small remake of Snowblox <em>(one of the games in the 2014 winter games event)</em>.</p> <p>I've fixed the tool itself <em>(how you put down the snowboard)</em>, but when I...
110438
0
How do I use not in a condition for things and this wont acdept this if its not long enough?
1614073498
jixere
2
2021-10-08 04:12:39
<p>for example when i try to use not in a condition, it wont work</p> <pre class='brush: lua'>if Player.Name == not "jixere then --blahblahblah end </pre> <p>that wont work for me.</p>
127813
3
Making a gui get displayed only at a certain distance?
37274601
Aperturee
22
2017-05-27 11:50:43
<p>I've managed to make a script that makes a text label visible when it hovers over a model. My question is, how do I; A) Make a table so it works on multiple models B) Make the gui be displayed only at a distance no larger than 16.</p> <p>Thanks in advance.</p> <p>Here's the code:</p> <pre class='brush: lua'>local Ru...
43279
0
Targeting system is off and targets the newest found enemy?
1820958039
P_4rio
15
2021-02-21 15:46:40
<p>Hello this might be a bit complicated and I'm not that very good at math so I had to follow tutorials obviously anyways I'm making a tower defense game and my targeting codes makes the towers target the newest found enemy instead of the enemy in front of all the other zombies.</p> <p>I saw nothing about this since t...
120467
0
How to make a random player picker and teleport them to a block?
1696235625
Cubispaghettis
1
2023-01-14 20:01:15
<p>Hello. I have a Scripting question. So, I am trying to make a game where basically a player gets teleported on a stage for 45 seconds, and then after that 45 seconds, that player gets teleported back to spawn. So basically, a random player gets teleported to a part for a specific amount of time (the stage), and afte...
132838
3
119978
1
1357830938
DindinYT37
212
2023-01-15 00:00:00
<p>As I've mentioned in my comment in the other answer, the other answer is trying to index the child of a <code>print()</code> call, which obviously does not exist. Also, you're trying to set the <code>CFrame</code> property of a <code>Player</code> Instance.</p> <p>Instead, it should be like this:</p> <pre class='bru...
0
Is there a way to shorten a Script ? Cause im lazzy.
146100287
Gigaset39
87
2022-09-16 08:12:09
<p>Hello from Romania, is there a way to shorten a script?</p> <pre class="brush: lua"> local Dice = math.random(1,3) hint.Value = '3' wait(0.9) hint.Value = '2' wait(0.9) hint.Value = '1' wait(0.9) if Dice == 1 then P.CanCollide = false end if Dice == 2 then ...
131636
2
118886
1
94006350
BulletproofVast
901
2022-09-16 15:31:33
<p>It really depends on what you're trying to accomplish. If its all going to be CanCollide = false then you could check for a range of numbers or enter all acceptable numbers into a table and check that if they're scattered around. (1) Otherwise I would have a table with a function for each number, which would make it...
0
Is it a local or server/normal script that can change the text of a gui in startergui?
1519151497
FluffySheep46209
369
2020-05-05 19:57:14
<p>Is it a local or server/normal script that can change the text of a gui in startergui?</p>
102026
1
94284
3
156586483
Leamir
2963
2020-05-05 20:05:36
<p>Hello, FluffySheep46209!</p> <p>Both scripts can change anything on your game, the only thing that changes is if the action will be replicated or not.</p> <p>Local Scripts make changes that only the LocalPlayer can see/interact, while normal scripts change for everyone.</p> <p>LocalScripts are commonly used with gui...
1
GUI Hide name button?
1939816
Maxwell_Edison
105
2015-04-29 21:52:42
<pre class='brush: lua'>local player = game.Players.LocalPlayer local Character = player.Character Hidden = false script.Parent.MouseButton1Click:connect(function() if Hidden == false then Character.Humanoid.HealthDisplayDistance = 0 Character.Humanoid.NameDisplayDistance = 0 Hidden = true ...
17120
2
20510
2
6855273
Exudo
13
2015-04-30 00:11:30
<p>NameDisplayDistance and HealthDisplayDistance are apart of Player</p> <p>So change Character.Humanoid to player.</p>
0
How to detect if a player is not inside of a Region3?
79662280
VelocityVH
6
2022-08-02 01:34:07
<p>Here is the current code:</p> <pre class='brush: lua'>local region = Region3.new(Vector3.new(0,0,0), Vector3.new(182.25, 67, 101.75)) local player = game:GetService("Players") local part = Instance.new("Part") part.Anchored = true part.Size = region.Size part.Position = part.Position + Vector3.new(8.375, 24.25, 42.8...
131052
0
how to make a datastore with leaderboard?
102229569
Luvaking
0
2021-01-11 21:02:14
<p>i cant make the datastore keep the leaderboard values ive been trying all the things i could think of and i even tried watching videos</p>
118562
0
How to make player rotate relative to camera while having tool equipped and holding RMB?
1085356580
LeedleLeeRocket
1179
2020-08-03 20:24:19
<p>I already have it so that the player can rotate relative to their movement whilst the cursor is locked to the center screen. Here's the code for that in case it is needed.</p> <pre class="brush: lua">local Players = game:GetService("Players") local ContextActionService = game:GetService("ContextActionService") local...
110641
1
How can I have a skin system in my game?
34716028
cmgtotalyawesome
1333
2019-12-31 08:03:37
<p>To elaborate on the question, what I want to happen is allow players to equip different player models that I made. To do this I thought that I would just put a model named "StarterCharacter" into <code>StarterPlayer</code> like usual. Then I realized that would mean every single person gets the skin. Is there any wa...
92275
1
85435
2
111523961
Azure_Kite
870
2019-12-31 10:10:22
<p>I'm not sure if im understanding the question correctly?</p> <p>but why not just make a script that changes the character's skin after the 'StarterCharacter' loaded from 'StarterPlayer' for each individual players??</p> <p>Edit : I have assumed that skin just meant texture and colors, but if you want each player to ...
1
startScript re-entrancy has exceeded 3?
77013963
SimplyRekt
413
2016-03-02 03:47:58
<p>I'm making an eye that is supposed to pulsate, however, I keep getting this error. It's really weird, as I've never seen it before.</p> <p>Script;</p> <pre class='brush: lua'>local eye=script.Parent:Clone() eye.Parent=workspace["Wisdom Fate Gauntlet"] spawn(function()while wait() do eye.Transparency = 1 eye....
28059
1
31524
1
817067
XAXA
1559
2016-03-02 04:19:26
<pre class='brush: lua'>local eye=script.Parent:Clone() </pre> <p>This tells me that this script is a child of of the thing being cloned. This means, that whenever <code>script.Parent</code> is cloned, the same script is run again, which then clones <code>script.Parent</code>... etc. This goes on forever.</p> <p>Either...
1
Why is my text label not updating?
8240169
bludud1234
40
2017-12-24 21:57:29
<p>Hello, I am changing the value of a text label with code so that it equals the number of coins that the player has, but the text label UI is not updating, even though I can print the .text of it and it displays its value.</p> <pre class='brush: lua'>local Players = game:GetService("Players") function onPlayerAdded(p...
50872
2
50684
0
28292108
superhudhayfa
39
2017-12-25 13:16:37
<p>The StarterGui is not what the player see's on their screen. What the player see's is apart of the PlayerGui. The PlayerGui is a folder pasted into each player when they join the server. The folder contains the default settings (unless disabled), like chat, ontop of what is contained in the StarterGui. Updating the ...
1
Is there an alternative of OnClose()?
160010262
theevanegps2
15
2017-07-15 19:51:13
<p>I watched a video about <code>OnClose()</code> and I saw that it was deprecated. But, I wonder if ther is a another way of doing the same thing. Can someone please tell me a least one way?</p>
45317
1
46247
2
303068787
martingalethreat
81
2017-07-15 21:44:16
<p>Putting this into a question so it can be closed.</p> <p>http://wiki.roblox.com/index.php?title=API:Class/DataModel/BindToClose</p> <pre class='brush: lua'>game:BindToClose(function() --Do stuff end) </pre> <p>Credit to: M39a9am3R</p>
1
How to get top player of the leaderboard?
1752724383
Xyternal
145
2021-05-18 20:01:25
<p>So I have searched over the internet for a tutorial, that shows the topmost player of the leaderboard after the round is over. But not a single website brings me satisfaction. So I thought that this website can help. Can you please teach me how to make the code? Thank you!</p>
123569
1
112664
1
80502300
OfficerBrah
440
2021-05-18 21:04:17
<p>this is the way I like to do it, by putting everyone's score in a table, sorting the numbers in the table from least to greatest, and checking to see whose score matches the highest score</p> <pre class='brush: lua'>local allScores = {} -- empty for now so that we can fill it later for i, player in pairs(game.Player...
0
How To Play a sound via a script ( not local?)
55310986
hokyboy
270
2020-10-14 21:47:17
<pre class='brush: lua'>local RepStorage = game:GetService("ReplicatedStorage") local KGFolder = RepStorage:WaitForChild("KGRemoteEvents") local ActivateRemote = KGFolder:WaitForChild("SharinganActivate") local ServerStorage = game:GetService("ServerStorage") local KGItemFolder = ServerStorage:WaitForChild("KG_Folder")...
114377
0
How to call the character of player?
73104115
hitmna123
21
2020-07-28 09:24:58
<pre class='brush: lua'>-- Tools local tool = script.Parent local handle = tool:WaitForChild("Handle") -- Player local players = game:GetService("Players") local player = players.LocalPlayer local char = player.Character if not char then char = player.CharacterAdded:Wait() end local humanoid = character:FindFirstC...
110147
0
How to Change Body Type In Character Customization?
109079013
LoyalQuickAngel
29
2021-04-06 07:07:49
<p>Hi, i wanted to make my character customisation to be able to change the player's body type. Such as choosing to use the block rig or the mesh rig. The problem is i have zero idea about how am i supposed to do it.</p> <p>Edit: I tried cloning a rig(e.g block rig)'s MeshParts and clone it into player's character, and...
122063
0
CanBeDropped does absolutely nothing to stop dropping of Tools, how to fix?
56140227
Kampfkarren
215
2016-09-24 01:59:27
<p>This is really making me mad. I want to make it so players can't drop their tools. When CanBeDropped is true, players can drop tools and they'll drop onto the workspace, and Unequipped is triggered. When it's off, the same thing happens except weapons this time DON'T drop onto the workspace.</p> <p>How do I just cut...
35832
0
Click Detector attempt to index a nil value error?
74051776
kujekmarek
24
2020-03-27 15:36:04
<p>I am making basic Work gui. Player who is working is chosing Bot's order. But when player click a part with Click detector, it print me this error:</p> <p><code>17:28:12.098 - Workspace.Work.WorkScriptButtons:33: attempt to index a nil value</code></p> <p>The script (Normal script) looks like this:</p> <pre class='b...
97241
0
Script decide to stop working? and i do not know why!
1044984225
datboyPiter
52
2021-02-22 09:09:53
<p>Hello when i tested my game yesterday evrything worked but today i tested it and it does not work i didn't change anything about it</p> <p>Here are the scripts that do not work the first makes the door swing and the other one is to play a animation</p> <pre class='brush: lua'>local TweenService = game:GetService("Tw...
120503
1
109879
0
167536064
MelodicSea5914
50
2021-02-22 10:53:34
<p>Roblox has deprecated the function Humanoid:LoadAnimation. For the variable controller, use script.Parent.Humanoid:WaitForChild("Animator") instead of script.Parent.Humanoid. Also, check if all the paths still exist.</p>
1
Why does a model float when it falls in the clientside?
849198397
jdm4llfem8
94
2020-12-05 20:29:50
<p>i have a welded model and all the parts are welded to the primarypart, i unanchor the primarypart. it falls, but it also floats. So if i make a model fall clientsided, it does fall but it also floats. But it falls normally when its serversided. Why does it float clientsided?</p>
116789
1
107192
1
81324278
DollorLua
183
2020-12-08 02:20:33
<p>Alright I found the issue</p> <p>This is a problem with the part's Network Ownership <a target="_blank" href="https://developer.roblox.com/en-us/articles/Network-Ownership">Here is a devhub tutorial on it</a></p> <p>Basically when a moving part gets far enough a way from a moving object controlled by the client, the...
0
How to make HeatVision via Raycast?
970566182
JojogamezYT
0
2021-10-07 14:14:24
<p>I tried to understand raycasting. But really its just confusing me. I really do not know how to make a ray follow the mouses position. The player needs to press and hold a key (Example: T) then point the laser via the mouse for a limited time (So they can only do this for 5 seconds). I never figured out how. Also id...
127809
0
Where do I fix my string/int text to copy my chat?
331809274
TechModel
100
2022-05-02 09:22:52
<p>I searched up this topic im working on and nothing really helps me get a clear understanding how to really convert string to character form. My script works by needing the character form, but my army wont repeat as I say in the chat. Of course Only people with these scripts copy my request.</p> <pre class='brush: lu...
129892
0
How to fix WeldConstraints Glitching and Flinging Everywhere?
143096970
Rayguyban2
76
2021-02-07 22:36:00
<p>I have made a script that connects all of the lines and dots together but when I unanchored them the parts just start glitched and jumping, and when my character touches them it flings me, I don't know how to upload pictures or videos but this is the code I used to connect them, I did not want to show the whole code...
119793
0
Is there a way to reflect a Gui Image?
42435512
dpark19285
370
2017-03-29 01:00:52
<p>I'm really sorry that this isn't technically a scripting question, but I was wondering if there are any properties that allow for an ImageLabel/ImageButton to be reflected on an axis, or if there is another way I could achieve this without using two different images. Thanks in advance.</p>
41427
1
43294
1
18039437
FieryEvent
180
2017-03-29 20:56:12
<p>Yes...</p> <p>However not in the best way you would expect, unlike a property, to reposition every column:</p> <pre class='brush: lua'>local function reflect(image) local pos = image.Position local size = image.Size local absSize = image.AbsoluteSize local rectSize = image.ImageRectSize for x = 0...
0
how to load and play an animation on/in a rig on game start?
703610999
R_LabradorRetriever
190
2021-09-06 23:08:48
<p>Since roblox changed how you do it, idk how to anymore. Could anyone tell me how you load and play an animation?</p>
127262
0
Why isn't my sword's debounce working?
173002126
Michael_TheCreator
166
2021-02-22 22:59:28
<p>Heyo, I'm trying to create a sword that takes 5 damage each time you click but it keeps taking 5 damage multiple times per click? How would I fix this?</p> <pre class='brush: lua'>local tool = script.Parent local safe = true local function OnTouch(partOther) if safe == false then local humanOther = partOther...
120538
0
If a module script containing a table is in ReplicatedStorage, can exploiters access it?
475089
Songist
49
2019-03-06 22:47:03
<p>I have run into an issue and I don't know where to go from here. The data for my game is stored on a table created with a module in serverstorage. This was fine, but then I realized I needed to access this data on with a LocalScript.</p> <p>How should I go about this? If I moved the data to ReplicatedStorage, could ...
77316
0
I made a little script but is there a shortcut for repeating the lines over again, help?
179461396
GameStealerKid
57
2021-01-13 19:55:39
<p>So here is the script I made and instead of doing line 1, 2 and 3 again can I look for the word Is in the value name and make that value false? If you can then can you help me on understanding to do it? I'm looking for a shortcut because soon I will add way more than 4 perks and would help a lot.</p> <pre class='bru...
118649
0
Invalid argument #3 (string expected, got Instance)?
1455743711
CrypxticDoge
59
2020-07-01 21:27:02
<pre class='brush: lua'>game.ReplicatedStorage.ChangeCrate.OnServerEvent:Connect(function(plr,str) local stats = plr:WaitForChild("stats").CrateValue local String = str stats.Value = String end) </pre> <p>Event^^ Apparently str is an Instance.</p> <pre class='brush: lua'>local plr = game.Players.LocalPlayer...
107969
1
99270
2
62087109
Raccoonyz
893
2020-07-01 21:47:36
<p>:FireServer() does not require a player instance as the first argument. However, since you provided it, the "str" variable is actually the player instance. This is because :FireServer() accepts a tuple of arguments,</p> <p>To fix it, you can do this. <code>event:FireServer("Large Crate")</code></p>
0
How can i award players a badge whenever i am at their servers?
72953296
Velege1
2
2018-01-10 23:38:50
<p>I want to make an script which whenever players enter the server i am or when i join their servers they will be award with a badge, the problem is that, it doens't works, there are no scripting errors as i checked, this is probabbly a FE problem i am having, and i also tried using both badges ID (The one from the li...
51923
0
For some reason this won't open the door?
122148588
Ize_Cubz
18
2018-04-19 02:05:42
<pre class='brush: lua'>local allowed = {5} local part1 = script.Parent.Parent.Union1 local part2 = script.Parent.Parent.Union2 local part3 = script.Parent.Parent.Union3 local part6 = script.Parent.Parent.RFID1.Union local part7 = script.Parent.Parent.RFID1.LED local part8 = script.Parent.Parent.Part function openclose...
57065
0
Reference another index inside the same table
36505167
chairman154
10
2014-02-17 19:00:03
<p>Okay, this is just an example of what I intend to use this for. I plan on using something like this to edit GUIs when the mouse enters, leaves or clicks it. For now I'm just testing it out so... I want data[Workspace.BasePlate].Properties to equal data[Workspace.Part].Properties. How can I reference it from <strong>...
39
0
How do I give a player a T-Shirt?
151079869
CrastificeDude612
71
2018-02-28 23:01:18
<p>Recently I've been using a method that allows scripts to give T-Shirts to people. But now I've forgotten. Can you help me?</p>
54392
2
53397
0
96317377
CaptainAlien132
225
2018-03-01 01:02:21
<p>Try this:</p> <pre class="brush: lua">--Put your T-Shirt ID here local TshirtId = "T-shirt ID goes here" --Shows the buy T-Shirt GUI script.Parent.ClickDetector.MouseClick:connect(function(player) game:GetService("MarketplaceService"):PromptPurchase(player, TshirtId) end) </pre>
0
How do I add numbers to my simple scoreboard?
1729046406
baconbroforpresident
0
2021-04-06 05:50:02
<p>I made a GUI scoreboard in StarterGui and I am having trouble figuring out how to actually make it work lol.</p> <p>Heres the script:</p> <p>local UIS = game:GetService("UserInputService")</p> <p>UIS.InputBegan:Connect(function(input) if input.KeyCode == Enum.KeyCode.E then script.Parent.Text = + 1 end)</p> <p>Scrip...
122060
0
When Touching Part Value Doesnt Change And Wait?
1680108820
JmoneyPlayzOfficial
49
2023-03-05 06:39:47
<p><em>i have no idea what to title this</em></p> <p>I'm making a script where it detects if your touching the part, if you are, it will wait a second, add 1 to everyone's value in playergui and it will wait another second then repeat. when the value reaches 60 or over. this script gets disabled. it doesnt work because...
133143
0
Why won't the ball spawn at all when the brick is clicked?
36511279
tyler46783
0
2016-03-28 00:54:08
<p>Hi, so I'm trying to make an automatic ball spawner at a certain position when the bricked is clicked, and after the brick is clicked twice the script is disabled. The ball for some reason isn't spawning, but it is printing Hi to show that the clicking is working. Is there something wrong with the cloning? Please he...
28953
0
Kick script doesn't kick the player?
160010262
theevanegps2
15
2017-05-03 15:03:39
<p>I have this script that kicks a player but it doesn't kick?</p> <pre class='brush: lua'>local gamepass = 0 -- Gamepass ID here game.Players.PlayerAdded:connect(function(plr) if game:GetService('GamePassService'):PlayerHasPass(plr,gamepass) then elseif plr.UserId == 8021038 then elseif plr.UserId == 16191...
42575
1
44148
0
8310972
RubenKan
3615
2017-05-03 17:00:04
<p>What you're trying to do is not allowed, as you're trying to kick a player the moment they join. The reason this occurs is because you're trying to set the parent of something to something, while roblox itself is parenting the player to the Players service.</p> <p>Simply typing in a <code>wait()</code> inside of the...
1
my idea of gui swaying is not very reliable how do i fix the bounciness?
1014156252
Puppynniko
1059
2022-10-18 15:50:44
<p>the first idea i had was to make a stationary point/attachment infront of the head and the gui would be updated constantly in a loop to that position. i know its a wacky solution but im not good with reading math head bob and yes i did took it from someone</p> <pre class="brush: lua">-- CONSTANTS -- -- Camera positi...
131958
0
why wont this leader board script work when i run the game?
519413699
KNOSIS
8
2019-07-11 20:42:21
<p>why wont this work? when i play it nothing happens.</p> <pre class='brush: lua'>function OnPlayerJoin(player) local leaderstats = Instance.new("Folder",player) leaderstats.Name = "leaderstats" local points = Instance.new("IntValue",player) points.Name = "Points" end game.Players.PlayerAdded:Connect(O...
83486
0
How does one create a door using .KeyDown?
328413134
LiLFriks
39
2018-02-19 21:33:43
<p>First of all, i suck at scripting. LmAo. So dooonttt judge. Anyway tried to create a script using Cframe and with bool values. It didnt work. I neeed heelp.</p> <pre class='brush: lua'>local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse() local IsOpen = script.Parent.IsOpen local RightDoor = script...
53978
1
53058
0
4517264
UgOsMiLy
1059
2018-02-19 23:37:33
<p>The Event <em>KeyDown</em> is deprecated, so use the <a target="_blank" href="http://wiki.roblox.com/index.php?title=API:Class/UserInputService">UserInputService</a> instead</p> <p>As for actually scripting the door, you would have to use a RemoteEvent to do that, as with Filtering Enabled on, other players won't se...
0
How to Throw object with middle mouse click?
306251570
A_thruZ
29
2019-06-02 15:18:21
<p>I am making a game in which you have to escape each level by picking up, throwing and dropping parts.</p> <p>My middle click (throwing) function isn't working. The part isn't moving at all, and I'm not sure if the click is registering. Am I using the input wrong? Please help.</p> <p>Oh, and here's the code.</p> <pre...
81073
1
75477
0
319545242
CommanderCaubunsia
128
2019-06-02 19:13:33
<p>IM Not In The Mood To Do It For You, its better if you practice by MAKING the script yourself. But If you use bodygyros or the body velocities or whatever, you can change the numbers so when you clone it into your item, it look liek you threw it. Now, for the middle click thing. I know the command for letters and ma...
0
How do I store the gui somewhere else for later use?
112378677
FireCoolflame
21
2019-11-08 01:43:04
<p>I currently have a screengui in startergui but i want it so that when i join the game the screengui isnt there but when i click on the dummy it appears. How would i go about doing this?</p> <p>local Click = game.Workspace.Dummy.ClickDetector Player = game.Players.LocalPlayer</p> <p>Click.MouseClick:Connect(function(...
89744
2
83205
0
62619014
123nabilben123
499
2019-11-08 01:54:04
<p>Here is your script hopefully fixed, use a serverscript under dummy</p> <pre class='brush: lua'>local Click = game.Workspace.Dummy.ClickDetector Click.MouseClick:Connect(function(player) player.PlayerGui.ScreenGui.Enabled = true end) </pre> <p>If that does not work try this but put your ClickDetector in the Dumm...
0
I am trying to make a Datastore to save Maps in my game, but it gives me this error. Any help?
529859410
JackyW9cky
27
2022-08-05 20:41:27
<p>I am currently fixing one of my games' Map Datastore, but when I leave the game it keeps giving me this error in the output:</p> <pre class="brush: lua">104: Cannot store Instance in data store. Data stores can only accept valid UTF-8 characters. - Server </pre> <p>I have absolutely no idea what this means and the...
131116
0
How do i add a wait to the reverse tween?
309903359
CrownedFigure
43
2020-07-31 20:06:25
<p>current script:</p> <pre class='brush: lua'>local tweenGet = game:GetService("TweenService") local anim ={ Position = Vector3.new(3409.593,45.931,-413.088) } local TweenStyle = TweenInfo.new( 1, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, true, 0.5 ) local tween = tweenGet:Create...
110404