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
0
How do I make my script work with my custom character?
1852615228
Zsows77
2
2022-07-31 00:43:16
<p>For my game I created a custom character (R6) that the player spawns as. I created this script for a sheathe to be welded to the player but it seems to only work when using the player's own character. When I try to play it using a custom character the script doesn't run and the sheathe does not appear.</p> <pre clas...
131025
0
Gui won't display on tool Equipped?
1491184861
666_brithday
103
2023-01-17 16:33:58
<p>My screen gui won't display</p> <pre class="brush: lua">script.Parent.Equipped:Connect(function() script.Parent.Parent.Parent.StarterGui["Device Screen"].Enabled = true end) script.Parent.Unequipped:Connect(function() script.Parent.Parent.Parent.PlayerGui["Device Screen"].Enabled = false end) </pre> <p>I hav...
132876
2
120007
1
433962773
theking66hayday
841
2023-01-17 21:22:40
<p>You are going to be using <code>PlayerGui</code> but instead of <code>Script.Parent</code> Your going to need to use <code>game.Players.LocalPlayer.PlayerGui</code> Full example in local script in your tool</p> <pre class="brush: lua">game.Players.LocalPlayer.PlayerGui["Device Screen"].Enabled = true --For the Uneq...
1
How do i reference every players character?
313291646
dangboxxer2786
4
2020-09-15 09:52:59
<p>I am trying to make a script that will unanchore every players humanoid rootpart on a NumberValue changed. The problem is I dont know how to refer to a players character.</p>
113190
1
103916
0
1522202318
NathanBlox_Studios
113
2020-09-15 10:57:01
<p>To get a players character</p> <p><strong>Client</strong></p> <p><em>Player, starter pack and player gui</em></p> <pre class='brush: lua'>game.Players.LocalPlayer:WaitForChild("Character") </pre> <p><strong>Server</strong></p> <p><em>ServerScriptService and workspace</em></p> <pre class='brush: lua'>--When a player ...
0
What happens if I &quot;break a string&quot;
49960495
ScriptNHelper
5
2014-02-28 01:46:38
<p>What is a broken string? Is there such thing? Can you provide an example?</p>
344
1
635
3
13135356
PlusReed
30
2014-02-28 02:44:17
<p>There is no such thing as a broken string.</p>
0
How do I sandbox code in my Script Builder?
25622294
Muoshuu
580
2014-02-19 03:44:46
<p>How would I prevent a person from crashing the server, using a "ManualSurfaceJointInstance" or an infinite loop without a wait</p>
78
0
your mesh has too many triangles limit is 10000?
385292422
Te9chira
1
2019-06-09 20:12:42
<p>im having this stupid problem in roblox studio when i import a meshid it says: your mesh has too many triangles limit is 10000 your mesh has ......</p>
81467
0
Boolean value keeps changing from false to true, and back again?
1507353142
Bloxyses
57
2023-02-22 18:32:37
<p><strong>Problem:</strong> The code is for a round system, and has a variable which is used to determine if there are enough players in the game. The variable uses two other variables, the amount of players in the game and the minimum number of players needed to start a round, and makes sure the amount of players is ...
133106
0
Is there a way to break a while loop outside it?
57340123
arthurgps2
67
2017-05-02 01:18:36
<p>I want to make a while loop that breaks when a function is called,but i don't know how to do it! Here is the while loop of my script and the function that breaks the loop</p> <pre class='brush: lua'>while true do script.Parent.TweenableValue.Tween:Invoke(thing,'InOut','Quad',20,true) repeat wait() ...
42538
1
44117
3
39250676
ScriptGuider
5533
2017-05-02 02:18:30
<p>Yes, but not in the same way you're trying to do. Loops won't execute the next line of code until whatever condition they're given is met. Therefore, using an infinite <code>while true</code> statement will run the loop forever, never executing the code after the loop's block, meaning your function <code>play</code>...
0
How to use HeartBeat properly?
148527490
manith513
121
2022-11-09 03:24:53
<p>I was trying to make a house where each part of the building disappears one by one. I was using a wait command in the for loop and realized it was too slow, and I learned that using HeartBeat did it per frame and would be faster.</p> <pre class="brush: lua">local house = script.Parent local runservice = game:GetServ...
132203
1
119407
1
123585026
NykoVania
231
2022-11-09 03:37:15
<p>This is how the hearbeat loop is used.</p> <pre class="brush: lua">game:GetService("RunService").Heartbeat:Connect(function() --script here end) </pre>
0
How do I make my building system build to the side of an part?
1130486229
cheslin23t
4
2021-09-14 23:07:59
<p>My question is posted here: https://devforum.roblox.com/t/how-do-i-make-my-building-system-that-can-build-to-the-side-of-an-part/1468109</p> <p>Please <strong>Help me</strong> so please don't just give me a script without telling me how it works. (Scripting helpers rules)</p>
127446
0
How can I fix my dice tool not giving effects?
1961959172
imnotaguest1121
186
2022-08-02 19:33:58
<p>Hello!</p> <p>I made a dice tool that gives you either bad or good boost</p> <p>The lower the number, the bad the effect Is, and the higher the number, the good the effect Is</p> <p>The problem Is that, when the tool Is activated the dice Is suppose to say the users name and give them a effect but Instead, says the ...
131069
0
How do I detect when a user presses the Spacebar?
11808841
blowup999
659
2014-02-21 21:53:46
<p>I know how to use keys like</p> <pre class='brush: lua'>plr = game.Players.LocalPlayer:GetMouse() plr.KeyDown:connect(function(key) if key:lower()=="e" then --Can just change e --Make something happen end end) </pre> <p>So how would I make something happen when I pressed spacebar?</p>
207
1
how do i make my spreading fire kill players?
1865523181
pakancina
19
2022-09-12 17:25:09
<p>i got this script. its a fire and when it touches a part the part burns too. so it spreads, sometime the burning parts explode. but the burning parts deal no damage. any ideas:</p> <pre class="brush: lua">function OnTouched(hit) if hit == nil then return end if hit.Parent == nil then retu...
131607
0
Why wont this script work? (URGENT) places blocks on the front top and rights sides of a block
76770652
dragonslayer1980s
0
2022-08-02 19:59:16
<p>This script is meant to place blocks on a 3d grid by rounding. BUT <strong><em>it only works on the top right and front Faces. ANY other faces will result in it placing the block inside the original.</em></strong></p> <pre class='brush: lua'>local Mouse = game.Players.LocalPlayer:GetMouse() local Positiona local blo...
131070
0
How do I make it so you can't see a billboard gui through the wall?
79846406
thehybrid576
294
2016-05-08 19:55:50
<p>I have a rank system, and ranks show above players, but I dont want it to show through the wall...is there any possible way?</p>
30413
1
33770
0
36267651
BlackJPI
2658
2016-05-08 22:11:09
<p>There is a property of BillboardGui's called <code>AlwaysOnTop</code>. When set to true, the GUI will always be rendered on top of objects in the workspace. When set to false however, it will appear behind objects that are in front of it.</p>
0
My character wont grab my model but I named one of the parts to handle. What do i do?
50642786
fartz808
30
2014-02-25 04:05:05
<p>(sorry im trying to learn to script an make my own game) I just made a gun model and named one of the parts to handle. It is weld scripted but is there something i did wrong because he flips upside down and wont move(so do i need a certain script i didnt know about)</p>
290
3
526
2
1924093
ChiefWildin
295
2014-02-25 04:11:14
<p>Sounds like one of the parts in your Tool is anchored. Try unanchoring all parts in it.</p>
0
Why won't this gui timer script work?
45536795
Jupiturd
15
2014-11-28 23:12:14
<p>In roblox studio it works all the way down to 0 but when I test it on a regular game it goes down a couple of seconds then it stops. Here's the code.</p> <pre class="brush: lua">while wait(3) do for i=300, 0, -1 do game.StarterGui.SFTimer.TextLabel.Text = ("Time left: "..i) wait(1) end end </pre>
12834
0
how do i make a point light turn on and off quickly?
54026054
imcoollikecool
8
2014-06-02 20:45:16
<p>how do i make a script where a point light turns on and off quickly like a strobe light</p> <p>please comment below what you think</p> <p>thanks</p>
6081
2
8151
1
34499422
pebbledog
5
2014-06-04 04:54:19
<p>this is another way:</p> <pre class='brush: lua'>while true do script.Parent.PointLight.Enabled = true wait(.1) script.Parent.PointLight.Enabled =false end </pre>
0
Stringvalue and textlabel problems?
93836159
ninja6311
0
2017-12-24 20:46:23
<p>So, i made a screengui, then textlabel into it, then i put a stringvalue into replicatedstorage, how do i do so the value of stringvalue is the text thats in the textlabel.</p>
50868
0
One out of multiple dev products working?
424448718
Sxribbly
16
2022-07-29 21:36:37
<p>I have multiple dev product scripts that give you something different depending on what product you buy. I have a shop gui where you can select which product you want to buy. Then I have a script for each product in the ServerScriptService that detects when a product is bought and give the player what they bought. M...
131000
0
How would you fix this script?
4269219
zachhg03
35
2014-07-25 18:01:16
<p>What the script does is deletes the players clothing/packages and replaces it with a zombie head, the zombie package and different body colors</p> <pre class='brush: lua'>while true do local Player = LocalScript.Parent if Player ~= nil then Player.TeamColor = game.Teams.Zombies.TeamColor Player:WaitForCh...
8670
0
How to join a friend's server?
5954078
RoyMer
301
2016-05-31 20:54:01
<p>How can I use the teleport service but make it so it joins the friend's server?</p> <p>Or is this just an illusion which makes the person rejoin the game as Roblox automatically matches people with their friends?</p>
31181
1
34398
6
65765854
eLunate
5136
2016-05-31 21:20:54
<h1>TeleportService</h1> <p>A quick search on the Wiki brings me to the TeleportService, where two particular methods stand out: <a target="_blank" href="http://wiki.roblox.com/index.php?title=API:Class/TeleportService/GetPlayerPlaceInstanceAsync"><code>GetPlayerPlaceInstanceAsync</code></a> (<em>Try saying that three ...
0
Most efficient way of opening a gate?
44186267
AdmiralLennox
0
2014-05-01 01:07:47
<p>I am currently building a model of the gates of Arendelle Castle (http://i58.servimg.com/u/f58/18/36/77/95/arende10.jpg), however I have run into a snag with getting them to open and close. A friend of mine provided me with a script she got from somewhere else, however it works imperfectly (http://i58.servimg.com/u/...
4034
1
why is there an erroe here i saw hedevking video and not coming?
2020062316
ncihxad1123
12
2021-06-09 08:29:08
<p>local DataStoreService = game:GetService("DataStoreService") local MyDataStore = DataStoreService:GetDataStore("MyDataStore")</p> <p>game.Players.PlayerAdded:Connect(function(Player) local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = Player</p> <pre class="brush: lua">lo...
124215
1
113242
0
1792778813
Xapelize
1835
2021-06-09 10:47:46
<h1>Answer:</h1> <p>wrong capitalization, should be Player not player (in your script line 13)</p> <hr /> <h2>Some notes:</h2> <h5>why is that called playerUserId, key will make more sense, but you dont need to change, it's working</h5> <h5>it's thedevking not hedevking lol</h5>
0
Raycasting dosent work to me as it should?
74686131
kristupas12344
26
2021-05-01 13:46:27
<p>I am trying to make a laser beam that would turn off if something is blocking it, but what ever i do it dosent work.</p> <pre class='brush: lua'><br />local origin = script.Parent.Position local direction = workspace.HUB local params = RaycastParams.new() local result = workspace:Raycast(origin, direction) if result...
122989
0
Incomplete statement: expected assignment or a function call obby?
746722812
thestorm2897
10
2020-04-02 23:41:28
<pre class='brush: lua'>local DataStoreService = game:GetService("DataStoreService") local myDataStore = DataStoreService:GetDataStore("MyDataStore") game.Players.PlayerAdded:connect(function(player) local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent= player local stage =...
97922
0
How do you make a upgrader in a tycoon do times?
65467608
thewinner5404
0
2016-10-15 03:28:52
<p>I'm making a tycoon and I want to know how to make a upgrader do times then just add how do I do this with a script if anyone can help me?</p> <p>This is the script I use: script.Parent.Upgrader.Touched:connect(function(Part) if Part:FindFirstChild("Cash") then Part.Cash.Value = Part.Cash.Value + 1 -- Try not to use...
36340
0
How to script an entity spawner?
479196253
LazokkYT
113
2022-06-07 01:49:08
<p>Hi I want to make a mob spawner similar to Islands'. I'm just asking if anyone has any ideas on how to achieve this? I want to make a spawner that spawns in a mob when the already spawned in mob is killed. If you want an example, you can look at Islands' slime spawner system. I don't really want code, just an idea o...
130258
2
117626
1
1354321048
Hi_People1133
168
2022-06-07 14:45:49
<p><strong>Hello</strong>,</p> <p>If the script above by "<strong>imnotaguest1121</strong>" did not work then try out my idea!</p> <hr /> <p><strong>Connect Function When NPC Dies</strong></p> <p>Make a spawner anywhere in the map wherever you want and make the Zombie NPC and parent it to ReplicatedStorage. Make a scri...
0
How do you make SurfaceGUI/GUI tween, longer for a specific time?
89028464
Lualaxy
78
2018-04-19 13:53:28
<p>So I made a tween size script for my simple SurfaceGui animation. My question is how do I make the tween size function run for a specific time so I decide when the gui part will reach my prefered tween possition?</p> <p>My code:</p> <pre class='brush: lua'>local Frame = script.Parent.Frame local StartButton = script...
57078
1
55785
0
338950628
RedcommanderV2
1256
2018-04-19 14:49:56
<p>You just have to add some things after the Udim2</p> <p>GUI:TweenPosition(UDim2.new(1, 0, 1, 0), "Out", "Quad", 3) The last 3 would be the time, the things before the 3 are neccesary! (you can change them though)</p> <p>(This is the same for tweensize)</p> <p>Click <a target="_blank" href="http://wiki.roblox.com/ind...
0
How do I fix this textbutton GUI brighten script from spazzing?
56021228
AmiracIe
175
2015-05-31 15:58:27
<p>So there's a play button. When the player's mouse enters the play button, the play button gets brighter. When it leaves, it returns to its original green color by un-brightening. I've made a pretty good attempt at this, but there's one issue: when the mouse quickly enters it and quickly leaves, it alternates between...
18030
1
21554
3
386992
BlueTaslem
18071
2015-06-02 03:28:33
<p>Don't use coroutines: they're messy!</p> <p>The key observation that simplifies these sorts of scripts is that you should describe this in terms of <em>while hovering</em>, not <em>when enter</em>.</p> <p>You're currently describing it like this:</p> <blockquote> <p>When the mouse enters, start brightening. When the...
0
How would you do an f string in lua havent seen anything on the forums?
473061959
johnoscarbhv1
137
2021-07-17 20:48:07
<p>I was wondering in other programming languages like python you have f strings where you could add a variable in the middle of the printing how do you do this in roblox tho?</p> <p>Example in a local script</p> <pre class="brush: lua">local button = script.Parent local player = game.Players.LocalPlayer local text = "...
125418
2
114156
1
85341864
JustinWe12
723
2021-07-17 20:58:07
<p>I forgot what it is called but you use .. (2 periods) for example</p> <pre class="brush: lua">local Name = "BOB" print("Welcome to the game" .. Name) </pre>
1
Why this CarSpawned script doesn't teleport the car next to the owner?
331809274
TechModel
25
2021-07-21 08:40:27
<p>Apparently it works only on R6, but I wanted to make it work on R15, but it spawn the car no where near the owner. Than the car spanwed near the R6 avatar.</p> <p>So what can I fix this script to make R15 work? Thanks</p> <pre class='brush: lua'>local P = script.Parent local player = P.Parent.Parent local index = 1 ...
125564
1
114257
0
158811
TGazza
974
2021-07-21 11:39:33
<p>R6 has a <code>Torso</code> as you know but the R15 doesn't have a single Torso bit it has an <code>UpperTorso</code> And a <code>LowerTorso</code>, Because of this your current script will break on R15!.</p> <p>To fix this, I would reference and use the base/root part of any player/character called <code>HumanoidRo...
0
Print The Name Script..? Error says Player is not a valid member of DataModel &quot;this gamer&quot;
946498536
Not_Paulo
4
2020-10-07 22:44:32
<pre class='brush: lua'>local player = game.Player.LocalPlayer script.Parent.Text = player.Name </pre> <p>doesnt work halp error: Player is not a valid member of DataModel "this gamer"</p>
114125
0
How to reupload all my animations to the group?
167536064
MelodicSea5914
50
2021-02-22 10:47:37
<p>Hi! About two weeks ago I have changed my game to a group game to work with other people. However, in the public game animations won’t load. When I looked into the situation, I found out that my animations need to be uploaded the the group and not too myself. How would I fix this?</p>
120506
0
RemoteEven: FireClient can only be called from the server?
34068239
NiniBlackJackQc
1491
2017-01-10 01:39:02
<p>How fix this? //FireClient can only be called from the server&#92;</p> <p>Game Explorer: https://gyazo.com/c1a27b624962cc329141890a46dcdac7</p> <p>Script -</p> <pre class='brush: lua'>game.Players.PlayerAdded:connect(function(player) local ChatBox = game.ReplicatedStorage.ChatHandler.ChatHistory:Clone() Chat...
38899
0
How to make a button slowly kill a player? (More info in desc.)
1039602854
Skyyrn
1
2021-02-21 01:04:24
<p>I want to make a button slowly kill a player, but when they exit a radius, they will stop taking damage. Here is the code that I'm using to get a button to slowly kill a player:</p> <pre class='brush: lua'>clickDetector.MouseClick:Connect(function() local h = hit.Parent:findFirstChild("Humanoid") whi...
120441
1
109829
0
490346166
A_Mp5
146
2021-02-21 03:09:12
<p>if im getting you right, this is what you want?</p> <pre class='brush: lua'> clickDetector.MouseClick:Connect(function() local healthrange = --what health you want them to end up with local h = hit.Parent:findFirstChild("Humanoid") repeat if (h ~= nil) then ...
0
How To Open A Door At A Certain Value?
1713506336
EmmaMallen
0
2021-01-13 12:09:43
<p>I'm making a maze horror game, and you need to collect 5 objects to win the game, but my script has an error that i just can't see.</p> <pre class='brush: lua'>local orbs = game.Workspace.Orbs local OrbsCollected = game.ReplicatedStorage.OrbsCollected orbs.RedOrb.o4.Touched:Connect(function(hit) if game.Players:...
118640
0
Why won't this admin check work?
2157438
v3c3
0
2014-12-18 06:06:13
<pre class='brush: lua'>game.Workspace.ChildAdded:connect(function(cp) for _,v in pairs(HAdmin) do player = game.Players:GetPlayerFromCharacter(cp) if cp.Name == v then wait() player.PlayerGui.Holo.OpenClose.Visible = true end if cp:IsInGroup(GroupId) and cp:...
13379
0
[Solved] I have working script but when i changed to LocalScript it wont work (?)
218573908
xFurkanToDie
4
2021-04-05 00:49:01
<p>MoveTo Script:</p> <pre class='brush: lua'>local NPC = script.Parent local part1 = game.Workspace.Part1 while true do NPC.Humanoid:MoveTo(part1.Position) wait(0.5) end </pre> <p>Touching Teleport &amp; Killing:</p> <pre class='brush: lua'>local dum = game.Workspace.Dummy game.Workspace.Dummy.Hitbox.Touched:C...
122021
0
Using _G but not working?
81482246
Conmmander
479
2016-02-14 06:17:49
<p>So I have 2 scripts and I am trying to use a big global table. For some odd reason it won't work. Console says theres an error on line 12 however the script editor underlines the [] Heres the global table:</p> <pre class='brush: lua'>_G.Admins = { ["conman0552"] } </pre> <p>For some reason it also doesn't like my []...
27380
3
30895
3
47966663
Pyrondon
2089
2016-02-14 06:25:01
<p>The reason it's causing an error is because you told the script to check the _G.Admin table in the position of "player.Name". Basically, the table is looking for a key which doesn't exist.</p> <p>What you should do is do a for loop through the table, and see if the child is an admin, like so:</p> <pre class='brush: ...
0
How to check if someone has a stringvalue?
1491184861
666_brithday
103
2023-01-30 15:24:04
<p>I want to check if a player has a string value but don't need to know how much is in the value if that makes sense. like example boolvalues you can check if they are true how can I check in a stringvalue if something is in the value.</p>
132975
1
120092
0
433962773
theking66hayday
841
2023-01-30 15:40:30
<p>Something like this. This checks to see if the stringvalue is empty then if it is it does nothing but if it isn't you can make it do what you want. Script:</p> <pre class='brush: lua'>if Yourstringvaluename.Value == "" then end else --put you want here </pre> <p>Note if this doesn't work remove the end and replace w...
0
How do I have an animation start and stop playing under specific circumstances?
1085356580
LeedleLeeRocket
1179
2020-08-07 22:58:10
<p>I'm trying to have a sprinting animation that plays when the walk speed is above 16. I could have it so that it plays when the player presses shift and stops when shift is released, but I have a stamina bar that automatically changes the walkspeed back to normal when it depletes, so having it play with left shit wou...
110938
1
101877
0
137316813
I_Nev
200
2020-08-08 00:02:42
<p>You was only telling it what the animation was on the first line:</p> <pre class='brush: lua'>local character = script.Parent local Humanoid = character:WaitForChild("Humanoid") local moving = false local RunService = game:GetService("RunService") local Anim = Instance.new('Animation') Anim.AnimationId = 'rbxassetid...
1
How to make a GUI change color when you touch a brick?
1554573538
kidsteve923
139
2021-04-13 14:47:34
<p>Hey there Devs I wanted to ask that how can I make a GUI change its color when a player touches a part for example : My GUI Color is red and when I touch a part it turns blue. I have been watching youtube for soo long asking the same question. I hope someone can help me if you didnt understand quite well what i said...
122331
3
111445
0
291424954
NGC4637
602
2021-04-13 15:12:41
<p>Note that this ain't a request site, you have to try to solve your problem first before you ask here. However since your new I'll help you out this once.</p> <p>In the gui that you want to change color, insert a local script with the following script:</p> <pre class='brush: lua'>game.Workspace:WaitForChild("ColorPar...
2
[ANSWERED] How do I script a script to separate unions and union again instantly?
407180563
robloxtitanic584
87
2021-02-18 17:43:36
<p>How do I script a script to separate unions and union again instantly?</p>
120332
0
What is the event for when a tool is in use?
29313560
JonathanZarb
0
2014-04-15 06:28:35
<p>Like I just pressed 1 to open the tool and I want something to happen</p> <p>if Tool.Open = true maybe?</p>
1545
0
How to connect a ps3 controller to roblox ?
16504446
alaingomez100
0
2015-04-09 03:07:00
<p>How do I connect my ps3 controller to my PC to play roblox ?</p>
16519
0
Why wont this work?!!!
10251657
RobloxHelper49
55
2014-07-10 07:56:23
<p>I'm EXTREMELY frustrated because a double-jump script JUST REFUSES to work in online mode! PLEASE SOMEONE explain why this darn FREAKIN SCRIPT wont work?!!</p> <p>The error i get is: "Humanoid is not a valid member of model"</p> <p>WTF... HOWWWWWWWWWWWWWWWWWWWWWW</p> <pre class='brush: lua'>repeat wait() until scrip...
7885
0
Making a Scripting gui, would like a general idea on how to run code with out using load string?
180198062
Nimbzee
14
2019-08-23 03:10:57
<p>so, I'm making a scripting GUI almost like a script builder, except your just coding I know how to make the guis work, that's not the problem, is the execution of code, and trying to make the texted colored, for example, local would be blue just like in-studio white version theme, and print would be blue parentheses...
86370
0
How to do loops?
57249717
iluvmaths1123
198
2014-05-31 07:43:12
<p>How do i do loops for scripting?</p>
5892
2
7836
5
17514438
TheeDeathCaster
2319
2014-05-31 07:59:00
<p>Loops? Ok.. Here are some example loops (Sorry if didn't help);</p> <pre class='brush: lua'>repeat until nil </pre> <p>1.This repeats a loop non-stop (see 3 for more information), but if you want it to stop at a certain point;</p> <pre class='brush: lua'>repeat wait(0)script.Parent.Value=script.Parent.Value+1 until ...
0
respawn on touch.
51440452
masterhalo55
75
2014-03-10 23:57:27
<p>I I'm trying to make a respawn on touch script' help?</p>
619
1
990
3
21190567
Kratos232
105
2014-03-11 08:44:44
<p>OK, here's the script. Put this script inside the respawn-on-touch brick.</p> <p>Script:</p> <pre class="brush: lua">script.Parent.Touched:connect(function(Hit) -- Activates if Touched Player = Game.Players:GetPlayerFromCharacter(Hit.Parent) -- Checks if what touched has a player. if Player then -- Checks the Playe...
1
How to make a tool to follow cursor movement
6030494
Exsius
162
2014-02-26 07:18:44
<p>I want to make a object (tool) that will simply follow the cursor, also how could I make the camera follow the cursor?</p> <p>Any help would be appreciated</p> <p>Thanks,</p> <p>Exsius,</p>
311
0
How to add an OnTouched Hotkey Punching animation?
110258409
Daiko_King
1
2017-01-17 22:10:24
<p>Sorry once again, I sound like a beggar but, Could you teach me how I would do this. Also, that when you touch the humanoid it does like -5 damage. I would also like to know that each time when that person presses the certain key it changes the animation every time.</p> <p>Much Thanks.</p>
39129
3
Plugin Manager
25691148
FromLegoUniverse
264
2014-03-03 01:42:25
<p>Is there a way to use something like :GetChildren() to all the plugins you have that use the new installing system?</p>
457
1
Help me push a button with Love2D? (also uses Lua)
103466946
kimbriel
19
2020-06-18 00:30:59
<p>Hello, I am using Love2D Lua, instead of Roblox Lua, i am sorry if this breaks the rules but I need help, it is supposed to add 1 to the score when I push a circle known as "Button" can somebody help?</p> <pre class='brush: lua'>function love.load() button = {} button.x = 200 button.y = 200 button.size = 50 ...
106681
0
[SOLVED] Setting TextBox.Text to a string automatically adds a &quot;fake space&quot;?
310696583
LeHelary
87
2019-12-17 16:32:47
<p>So, I want this script to set the <em>Text</em> property of the <em>TextBox</em> to a <em>string</em> called <strong>command</strong>, and then move the cursor to the end of the string.</p> <pre class='brush: lua'>local command = CommandName.Text CommandBar.Text = command CommandBar.CursorPosition = 100000 </pre> <p...
91523
0
Buy button used to work, no longer does. Why?
386187622
MsMonkeyToes
0
2017-12-24 23:02:21
<p>Hey, I used the Roblox wiki example of how to create a buy button so that the client can click it and pay Robux to add money to their leaderboard. It used to work on my game, but now it no longer does. I'm wondering if this has anything to do with the fact that I clicked filtering enabled on my game. If so, why woul...
50878
0
If leaderstats is this high, then change sign text?
238838551
PadmeOragana
41
2020-01-04 01:26:16
<p>So I am making a game, and I want it where if you have more than 49 dollars, the sign will say something if you have less than 49 dollars, it says something different. I made random words for this example, so here it is. The problem is that the sign doesn't change. Thank you!</p> <pre class='brush: lua'>local Player...
92489
2
85598
0
314962309
XviperIink
315
2020-01-04 02:48:20
<p>What I believe you need is to detect is the player's money value has change. For that, I will be using <a target="_blank" href="https://developer.roblox.com/en-us/api-reference/function/Instance/GetPropertyChangedSignal">GetPropertyChangedSignal</a></p> <pre class='brush: lua'>local Player = game.Players.LocalPlayer...
0
Clothing script help? NOT ANSWERED
81321289
smd34
30
2015-04-29 20:43:40
<p>I made a script that will load a player's clothing based on their teams. The script works but the Clothing doesnt load. It sometimes says in the output "failed to resolve texture format." or something like that. This is the script.</p> <pre class='brush: lua'>--Realy simple function to remove an item function rmItm(...
17118
5
Why is this KeyDown function not working?
13667373
EzraNehemiah_TF2
3552
2015-01-27 15:31:15
<p>Why isn't this script working? Everything seems correct. This is a local script in startergui.</p> <pre class='brush: lua'>local debounce = false local plyr = game.Players.LocalPlayer local mouse = plyr:GetMouse() mouse.KeyDown:connect(function(key) if not debounce then debounce = true ...
14558
2
17633
0
61790180
MessorAdmin
598
2015-01-27 21:31:40
<p>( Note : &lt;http://wiki.roblox.com/index.php?title=Taking_keyboard_input >)</p> <pre class='brush: lua'>local debounce = false local plyr = game.Players.LocalPlayer local mouse = plyr:GetMouse() mouse.KeyDown:connect(function(key) if debounce == false and key == 'r' then -- Works just fine ...
0
How to LeftClick To Punch?
871412957
OrewaKamidaa
40
2019-08-05 12:32:00
<p>What Keycode For Left Click here script for punch :</p> <pre class='brush: lua'>local player = game.Players.LocalPlayer local db = true local damage = false local anim = Instance.new("Animation") anim.AnimationId = "http://www.roblox.com/asset?id=3582012915" game.Players.LocalPlayer.Character:WaitForChild("RightHand...
85149
1
79050
0
24546863
LukeSmasher
619
2019-08-05 15:29:14
<p>It's not a keycode you're looking for (because the mouse doesn't have keys), but a UserInputType: <code>if input.UserInputType == Enum.UserInputType.MouseButton1</code></p>
0
How to make a robux supscription for your game?
1479528071
Blueturtle8908
17
2021-06-07 22:15:43
<p>Instead of a one time pay or a dev product that you pay one time to get how do you make a subscription where you have to pay some robux a month to get some stuff</p>
124181
0
How mix loadstring http get and normal code ?
173445320
CozLex
0
2019-11-16 19:46:49
<p>For explain my script is like that :</p> <pre class='brush: lua'>loadstring(game:HttpGet("https://mywebsite.ccom/index.php", true))() wait() if ban == true then print(ban) end </pre> <p>the website page is :</p> <p>local ban = true</p> <p>And if i replace "local ban = true" by local ban = "test"</p> <p>when i print ...
90101
0
How can I change the FoV to be higher while falling ?
189889285
NatesNightmare
0
2021-04-05 02:38:10
<p>I making a free running game and I want your screen zoom out from falling from a high drop.</p>
122024
0
How do I add up values?
999502939
Dragonboy99711
5
2020-06-11 11:00:49
<p>Heya guys, I wanted to make a tool that increases a value whenever activated, this is the script I tried. (I used Roblox's script template.)</p> <pre class='brush: lua'>local tool = script.Parent local function onEquip() end local function onUnequip() end local function onActivate() game.Players.LocalPlayer.Char...
106076
0
How can I make a random weapon spawner that spawns multi-part weapons?
1631181
sergiu8957
5
2014-02-20 20:48:57
<p>I've been trying to have something like this for a while for a project I've been working on. However, I don't seem to have any luck. What I need is a part that spawns a random weapon out of an assigned weapon pool. I currently have one that does exactly that, but weapons made out of more parts only spawn the handle,...
181
0
&lt;name&gt;' expected near '&quot;Name&quot;' ?
472043536
Capris_Succ
0
2018-07-07 22:38:48
<p>I ran into this problem multiple times. Problem: &lt;name>' expected near '"Name"'</p> <p>Script:</p> <p>p = game:GetService("Players").LocalPlayer game.Players.PlayerAdded:connect(function(player) if player.Name == "Capris_Succ" then local p = Instance.new("Part", workspace.npcs, Vector3.new(-139.8, 0.5, -190)) gam...
62097
0
how do you make a function onStopped?
4376147
NotSoNorm
772
2014-05-17 22:04:46
<p>Is there a way that I can get an event to trigger if the sound is not playing anymore?</p> <pre class='brush: lua'>while true do wait(1) if script.Parent.Sound.IsPlaying then script.Parent.Parent.SongPlayNoter.Visible = true script.Parent.Parent.ScrollingFrame.Visible = false elseif script.Pa...
5006
0
invalid argument #2 to 'random' (interval is empty)?
53250045
pilotly
15
2020-09-13 05:23:21
<p>Hello. Im new to tables and im trying to make a system of a random number being pulled from a table but i get the error. " invalid argument #2 to 'random' (interval is empty)". Any help is thankful.</p> <pre class='brush: lua'>local lengths = { Short = 100, Medium = 500, Long = 1000 } local length = math...
113103
0
Maximum Decal Pixel Size?
11100746
WildStar2
0
2014-05-08 22:58:34
<p>What is the maximum size a decal can be in pixels on Roblox?</p>
4542
0
Why Is This Script That Gives Gamepasses Only Give The Items When The Player Leaves And Rejoins?
173807900
MrSarp_shoot
36
2021-05-04 21:27:46
<p>I have a script that is supposed to give gamepasses when the player clicks a button.</p> <p>(local button script)</p> <pre class='brush: lua'>script.Parent.MouseButton1Click:Connect(function() game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer,15413257) end) </pre> <p>(gamepass...
123100
1
112184
1
80502300
OfficerBrah
70
2021-05-05 01:23:21
<p>Players.PlayerAdded only fires when the player joins for the first time. If you want the coil to clone to the player's backpack every time they spawn, you can use the player's CharacterAdded property</p> <pre class='brush: lua'>local MarketPlaceService = game:GetService("MarketplaceService") game.Players.PlayerAdded...
0
Hep with for loops?
15619704
NinjoOnline
1146
2015-05-08 23:56:48
<pre class="brush: lua">local codes = {"AO67XcAf", "B12YdJqO"} for _, v in pairs(codes) do if v then if codebox.Text == v then print("Correct") else print("Wrong") end end end </pre> <p>There are no errors. When I put in the wrong code it prints wrong, but if I pu...
17374
2
Best way to save plots into datastores?
1017846707
Overseer_Prince
188
2022-12-08 00:44:42
<p>So I was planning on i,v looping around a plot and saving it this way but</p> <p>then I realized.... that</p> <p>if a player were to load and leave at the same time while the house is loading</p> <p>that would mean some of the items that take time to load would be lost</p> <p>so the next solution I came up with was ...
132500
0
How to make if strenght ( in leaderboard ) = 100 then + 100 cash, and strenght reset to 0 ?
1715586226
PPJASK
19
2021-02-21 09:31:56
<p>How to make if strenght ( in leaderboard ) = 100 then + 100 cash, and strenght reset to 0 ? - How to make that ? - PPJASk -best regards</p>
120455
0
How do I make a npc killer take a players skin?
358253220
Zack_Atro
0
2022-07-31 00:30:38
<p>Anyone know how I can do a thing where whenever a npc killers kills a player it then looks like that player?</p>
131024
0
Anyone know how to script fireball projectiles?
260908678
GigantiChase
0
2021-01-28 21:20:57
<p>I tried looking at YT and used this local script</p> <p>local Player = game.Players.LocalPlayer</p> <p>local rp = game:GetService("ReplicatedStorage") local FireBall = rp:WaitForChild("FireBall")</p> <p>local UIS = game:GetService("UserInputService") local debounce = false local cooldown = 2</p> <p>UIS.InputBegan:co...
119310
0
How do i make a part spin freely around on a weapon?
837977800
exitwoundz
15
2020-05-17 06:22:40
<p>I'm trying to get a part to spin on a weapon/armor that is welded to the character when the player equips it. Sort of as a decoration bit.</p> <p>Using part.Rotation will rotate the part based a world rotation, not a local rotation to the part. See image how the shoulder looks fine but the shield isn't when the play...
103442
0
Issue with awarding a badge to player who touches part?
1636593238
sonicgamer372432
2
2022-07-29 17:38:08
<p>Hello! I've been having a little bit of issue with my game. I wanted to make it so when a player touches a certain part, it awards the player a badge and comes up with a GUI. I did it once and it worked, however after I added lines 7, 10, 11, and 12, it stopped working. If anyone could help I would really appreciate...
130998
1
118349
0
1543400900
Pro_beatz
36
2022-07-29 20:36:49
<p>I think you mean gui.visible = true Fixed Code:</p> <pre class='brush: lua'>local badgeService = game:GetService("BadgeService") local id = "2127702459" local brickynicky = script.Parent local function doThingy(otherPart) local player = game.Players:GetPlayerFromCharacter(otherPart.Parent) local gui = game.S...
0
How do i code Wait Until LocalPlayer Touches Brick?
1565621745
BluelyTASer
10
2020-09-15 00:37:26
<p>I want to know how to do that.</p>
113173
0
Could someone help me fix my sound playlist?
28175545
Lapwn
10
2015-03-15 01:39:38
<p>All of the song times are correct but it wont even play the first song.</p> <pre class='brush: lua'>wait() game.Players.PlayerAdded:connect(function(nP) wait() local Playlist=nP.PlayerGui for _,v in pairs(game.Lighting:GetChildren()) do if v:IsA("Sound") then v:Clone().Parent=Playlist wait() while wait() do Playlist...
15777
0
Close button
39023879
beastmodetime14
0
2014-02-26 07:07:19
<p>I have a close button but when I press it ,it removes the text instead of the whole thing. Anyone know whats wrong?Thanks</p>
310
0
'&lt;name&gt;' expected near '/'? What does this means?
71332023
Namityyy
0
2016-07-03 20:45:39
<p>This is a simple face animating script. Can anyone tell me what is wrong?</p> <p>Script: while true do wait(1) script.Parent.Mouth.Texture = http://www.roblox.com/asset/?id=279666891 math.random(1,3) script.Parent.Mouth.Texture = http://www.roblox.com/asset/?id=176217905 end</p> <p>Output: 16:47:51.867 - Workspace.C...
32573
0
How can I modify the script so It follows other people and damaging them Instead of you?
1961959172
imnotaguest1121
89
2022-06-22 15:23:27
<p>So What I mean Is that, I want to modify this script so when you summon a NPC It will protect you by following the other players, damaging them?</p> <p>Oh and also a problem with the script Is that If being cloned lets say, replicatedstorage then, the pathfinding script stops working</p> <p>script:</p> <pre class='b...
130467
0
How to rotate a whole model?
32477251
iSidersz
59
2020-06-15 21:04:59
<p>I made a model and I want it to move side to side as a bell would, but I have absolutely no idea how to go about this.</p>
106484
2
How do you make a gamepass that you can I buy inside the game?
4694638
alan3401
28
2014-03-08 00:12:38
<p>So, I'am making a gamepass and I want to know how you can make a gamepass that you can buy a inside the game.</p>
559
0
Struggling to find bug in my script from my clicker game?
1073917569
Puppy_lovertheawsome
84
2023-03-21 08:49:35
<p>So I have been making this game and I'm trying to add an <strong>upgrading system.</strong> But the script that meant to be the <strong>automated stuff</strong> your making isn't working with the <strong>rework.</strong> The goal here is to combine <strong>the number of buildings</strong> you have by <strong>the mul...
133220
0
How to fix lag in this script It runs a loop to check if a player died?
55310986
hokyboy
207
2020-10-18 02:29:54
<pre class='brush: lua'>local Player = game.Players.LocalPlayer local RepStorage = game:GetService("ReplicatedStorage") local Remote = RepStorage:WaitForChild("DeathRemote") local function FireRemote() Remote:FireServer() end while true do wait(1) if game.Players.LocalPlayer.Character.Humanoid.Health &lt;= 0 th...
114499
1
105181
1
1169989018
LinavolicaDev
540
2020-10-18 02:45:20
<p>Okay, bro! <code>Humanoid.Health</code> is a property of <code>Humanoid</code> and it has no <code>changed</code> event.</p> <p>So you may change it to:</p> <pre class='brush: lua'>local hum = Player.Character.Humanoid local previousHealth = hum.Health hum.Changed:Connect(function() if previousHealth ~= hum.Heal...
0
How to insert a region 3 in the same position and at the same size as a part?
76734233
generalYURASKO
87
2021-02-22 23:13:41
<p>Ive been looking for a way to put a Region3 in the position of a part, and In my search I found this</p> <pre class='brush: lua'>local RegionPart = game.Workspace.RegionPart local pos1 = RegionPart.Position - (RegionPart.Size / 2) local pos2 = RegionPart.Position + (RegionPart.Size / 2) local Region = Region3.new(po...
120540
1
109918
1
73170429
imKirda
2679
2021-02-23 12:34:44
<p>Uh well alright, i did not want to go into this complicated for me math but i will try to explain it. Roblox regions they need top left and bottom right vectors of the region to make it work, in wiki it says Min and Max.</p> <p>The way how it works is that <code>Position</code> property in Roblox returns position of...
0
I cant get a text label via the player gui?
98600858
cjkizzy286
40
2020-12-11 19:49:49
<p>Im trying to make a hide and seek game and i cant get the gui via player gui (sorry if i dont fully understand player gui im new) the code is</p> <pre class="brush: lua">local player = game.Players.LocalPlayer local allplyrs = game.Players:GetPlayers() -- local seeker = allplyrs[math.random(1, #allplyrs)] local seek...
117064
1
107326
1
377679694
TheB4dComputer
100
2020-12-11 19:56:58
<p>To get a player's character from a localscript, you would have to use player.Character</p>
1
How to change a ParticleEmitters lifetime via script?
72199055
Soliate
80
2015-04-30 08:51:26
<p>I've tried to get this to work but the output is saying that I'm using a bad argument,</p> <p>Here is my code,</p> <pre class="brush: lua">local p = script.Parent local pe = p.ParticleEmitter pe.Lifetime = 5 </pre> <p>It's probably a very simple fix, I've most likely just made a mistake, but I can't spot it out, tha...
17131
0
Trying to weld an item to a player but it wont run anything and gives 0 errors, why?
1674805834
Black_Magic2533
104
2023-02-25 07:19:48
<p>I just want to weld a basic part onto a player (the part already has a weld with all the proportions btw) but for some reason i cant see the part on the player and if i look in the Explorer its not parented either, can someone please help me out</p> <pre class='brush: lua'>local ServerStorage = game:GetService("Serv...
133118
1
How do I make this sprint script compatible on mobile devices?
85691477
2_dew
7
2020-09-14 01:37:16
<p>Hey everyone! This is my first question on this forum, so sorry if anything is wrong or in the wrong format.</p> <p>So, I have this thing in my game which allows you to sprint with the press of the shift button. It also plays an different animation while running.</p> <p>Heres the full script, being parented in Start...
113144
1
Unable to cast to dictionary?
353632707
SuperSM1
67
2021-08-06 18:15:05
<p>That's the error I'm getting with my tween here's the tweening code (LeftVan is a model)</p> <pre class='brush: lua'>local Tween = game:GetService("TweenService") local Drive = TweenInfo.new(5,Enum.EasingStyle.Quart,Enum.EasingDirection.In,1,false) local Point = Vector3.new(-136.302, 543.42, -138.172) local Tweened ...
126174
2
Locking the mouse/camera, like in MouseLockSwitch
4338714
OniiCh_n
410
2014-02-17 05:04:30
<p>How would I get the camera to follow the mouse, and to lock the mouse to the center of the screen, kind of like in MouseLockSwitch. The reason I don't want to use MouseLockSwitch is because players would be given the option to NOT use MouseLockSwitch, causing the game's fundamental mechanics to suffer. (Making a MOB...
23
0
How do I use animations on objects in game?
137505940
GameBoyOtaku
63
2017-11-03 16:33:55
<p>This is a problem for me because it's not in a tool and it's not a player character it's a model but when I try to use it in game it just stops working. I don't really know why I can't figure it out but any help will be useful.</p> <pre class='brush: lua'>local controller = Instance.new("AnimationController") contro...
49099
1
How To Make Fnaf 1 Animatronic System?
1680108820
JmoneyPlayzOfficial
49
2022-12-21 10:21:06
<p>hi, im making a fnaf fangame and im trying to make a system where after a while a script will choose between a random of 2+ rooms and then teleport the animatronic / rig to that part facing the same way the part is and then loop the whole script, here is my script I have so far</p> <pre class='brush: lua'>local bot ...
132623
0
MoveTo rounding
24678974
orangebaron
0
2014-02-18 03:27:25
<p><code>Workspace.Model:MoveTo(Vector3.new(0,0.3,0))</code></p> <p>When I make a model with 1 part in it and use that code in the command bar it moves the part to 0,.4,0. Is there any way to get around the rounding?</p>
56
1
How can I switch a player between first person and third person?
72266674
Dekadrachm
50
2016-07-20 07:55:37
<p>Hello, in my place, I want to switch players to third person when they are in a lobby, and switch them to first person when they are in a match. I am having issues doing this. For some reason, I'm only able to switch to first person using this bit of code:</p> <pre class='brush: lua'> game:GetService('Players').L...
33369
1
36169
0
33167175
1N0body
206
2016-07-20 08:05:22
<p>They need to scroll out.</p> <p>It works only this way.</p> <p>If you want to avoid it:</p> <p>You'll have to change the 'CameraMinZoomDistance' at 'StarterPlayer'(game.StarterPlayer), and try setting it to 5. This will also 'force' the player not to be able to scroll into first person.</p>
0
How to disable movement when a gui is visible?
412955334
AriyanHacker29
22
2020-07-11 02:07:51
<p>i have been having problems with this code. I want to make it stop an movement of the player when that frame is visible. I tried the script below but if didn't work (i took the movement control script from roblox's devforum). PLease help, thnx ps: I am new so i am bad at scripting</p> <pre class='brush: lua'>local U...
108748
0
How do i make a part point where the players mouse is facing when they are are sat in a seat?
598363835
Mrpolarbear2games
55
2023-02-19 15:01:13
<p>Hello, I am currently working on a script for a tank where when the player is sat in the tank seat they can aim the turret on the front. I tried using a remote event to get the mouse position but then remembered that you cannot pass mouse properties. So, I placed a Local Script in StarterGui. It detects when the pla...
133092
0
How to make a horizontal distance bar?
430231091
sixfirez
33
2023-03-23 16:51:25
<p>so i just have like a glass bridge game and want to show how far the players are with a bar</p>
133233