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
How do I prevent a gui from going past the X/Y borders of it's parent container?
44083134
Fifkee
2017
2018-11-30 04:41:22
<p>I'm planning to make a GUI-based game, but I have little experience with arithmetics when it comes to the Vector and UDim sets.</p> <hr /> <h2>What I want to do:</h2> <p>I want to be able to have a player-controllable frame (already handled) that cannot escape the borders of it's parent container, specifically, anot...
71359
0
What is wrong with this model relocator?
11156187
supermarioworld323
45
2015-02-04 00:56:23
<pre class='brush: lua'>script.Parent.ChildAdded:connect(function(child) if (child.Name == "SeatWeld") then local Char = child.Part1.Parent local Human = game.Players:GetPlayerFromCharacter(Char)-- Relocate if (not Human) then return end local heli = script.Parent...
14729
1
17793
0
52302097
JasonTheOwner
391
2015-02-04 11:30:05
<p>Line 13, change it to ChildRemoved event, instead, since it seems this would be code for that type of situation.</p>
1
How do I clone a character for the client only? [ANSWERED]
529859410
JackyW9cky
27
2022-10-17 22:50:36
<p>So I am working on a game that has a cutscene at the beginning. I made a script that waits for your character to load, then duplicates your character and puts it in a specific position. Then, when the cutscene happens, it shows your character.</p> <p>This script works, but since it is a Server Script, if more than 1...
131952
1
119171
1
136245173
SharkRayMaster
265
2022-10-18 01:50:15
<p>Use a LocalScript to clone the players character, that way only the client will see his own character</p> <p>Tho, if you don't wanna do that, you can clone all players characters in the server, then make a LocalScript that deletes all clones except the LocalPlayer's clone</p>
0
What is the command that will make Script A run Script B and C simultaneously?
199898563
ricardosousayt
0
2018-04-20 20:58:26
<p>Hey, I want to run a script that already exists by running a script. What I'm looking for is a command that I can enter in a Script A that will make Script B and C run simultaneously. Thanks</p>
57139
0
Line 31 Attempt to get length of a nil value?
755131693
LolXD_ItzTreyXDLol
0
2020-08-01 13:55:57
<p>So I have a problem with my module script where is says there is a nil value I have tried going on the dev forum and looking it up, and just simply looking up the error but here is the script</p> <p>P.S this is for a egg system</p> <pre class='brush: lua'>local petModule = {} petModule.pets = { ["Epic"] = {game....
110469
0
How can I tween currentangle of motor6d?
37092313
tim458458
29
2018-04-28 09:34:49
<p>Hello, so I am a scripter myself. I work with tweens and for some weird reason motor6d's CurrentAngle ONLY want to get tweened in studio play. As fast as I go out of studio play it for some reason won't tween it at all.</p> <p>Anybody got a solution for this? Thank you. (I contacted many other scripters and none got...
57552
0
Why isn't my sell script changing the leaderstats?
676006117
cucucu0001
35
2020-03-27 15:32:02
<p>I'm trying to make a simulator game and I've started by making a sell pad that's supposed to trade your Breaths for Money (1:1 ratio). When I step on the sell pad, the money should be set to the breaths and the breaths should be set to 0. I added print statements in the function to troubleshoot so I know that the To...
97239
0
How to save a table to a data store?
72911606
SebbyTheGODKid
198
2018-01-23 22:08:27
<p>Yeah, that's it. The wiki is useless. Thanks for your help in advance.</p>
52574
1
51987
2
49773669
cowsoncows
926
2018-01-23 22:36:37
<pre class='brush: lua'>local DSService = game:GetService("DataStoreService") local savedTable = DSService:GetDataStore("savedTable") local table = {"One", "Two", "Three"} savedTable:SetAsync("Key", table) </pre> <p>You save a table just as you would save any other value. Usually for the key I use the player's UserId s...
1
How come this stats script is not working properly?
4694638
alan3401
28
2015-03-24 17:38:08
<p>So, the script has to grab the stats and show it up on a gui for some reason the script is not working.</p> <pre class='brush: lua'>local GUI = script.Welcome local stats = script.playerstats join = (function (Player) local GuiClone = GUI:Clone() if not Player.Character then Player.CharacterAdded:wai...
16033
1
19249
0
5820674
woodengop
1134
2015-03-25 07:04:17
<p>In line 04 you have <code>Join = (function (player)</code>replace that with <code>game.Players.PlayerAdded:connect(function(Player)</code> Please Correct me if I am Wrong, but I think You can't make Functions/Events a Variable.</p>
0
How to make a Textbutton in a SurfaceGUI enable a Gamepass Prompt?
1680108820
JmoneyPlayzOfficial
8
2022-11-24 05:34:25
<p>i want a part so when i press the button on the front (I already have the GUI done), a gamepass prompt pops up</p> <p>here's what I have</p> <pre class='brush: lua'>local GamepassId = 105980615 script.Parent.MouseButton1Click:Connect(function() game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Pl...
132362
1
119546
0
1792778813
Xapelize
2602
2022-11-24 05:37:41
<p>Basically, you just need to put the <code>SurfaceGui</code> to the <code>StarterGui</code> and make the <code>SurfaceGui</code>'s adornee property to the part.</p> <p>Since LocalScript doesn't run if its inside <code>workspace</code>, so this should fix the problem.</p>
6
How to randomly list objects of an array?
79000540
kazeks123
195
2019-01-04 12:07:56
<p>To put it simple, I want to go through every single object in an array in a way that is random every time.</p> <p>I've found out that by using this method:</p> <pre class="brush: lua">local array = something:GetChildren() for i=1, #array do array[i] --do something end </pre> <p>it would go through every single o...
73759
4
69544
5
39250676
ScriptGuider
5640
2019-01-04 12:35:14
<p>There are evidently <em>many</em> solutions to this problem, but I'll just share the first (and in my opinion, the simplest) that comes to mind.</p> <h2>Solution</h2> <p>You most likely don't want to change the state of the array whilst listing random indices, so you probably want some sort of buffer to temporarily ...
0
Is there any web API for checking if a user has premium?
341976603
nestriff
27
2019-10-05 23:12:35
<p>Is there any web API for checking if a user has premium?</p> <p>I would like to make a website for limiteds but one of the features I want to include would require checking if someone has premium or not. Is there any web api that can do that?</p> <p>Or if not, how would be the best way to determine if someone has Pr...
88386
0
How do I make an avatar appear on a ViewportFrame? [SOLVED]
92775757
Owengren
31
2019-10-22 11:18:06
<p>Hello! I am trying to make a head appear on a screen, just like in Doom. (No: I am not recreating Doom in Roblox) For some reason, whenever I set a variable to the player's cloned character, it always resets itself to <strong>nil</strong>!</p> <p>Here's my script which is called "1":</p> <pre class='brush: lua'>loca...
89072
0
Teleporting Models Help?
51676109
TrollD3
105
2015-05-03 18:43:19
<p>I want to make a gui that when they click a button, a car spans next to them Idk how to teleport models but I tried in the script below and of course is isn't working.</p> <pre class='brush: lua'>function OnClicked() for i, v in pairs(game.Workspace) do v.Car.CFrame = CFrame.new(Vector3.new(50, 50, 50)) -- Change n...
17245
0
I need help editing a mute boombox script.?
146406913
ParSoft
2
2020-08-14 01:04:57
<p>I need help on a localscript that mutes the audio that is playing so you cant get blasted with some extremely loud audio that could possibly lag you. as seen in <a target="_blank" href="https://www.roblox.com/games/648362523/Breaking-Point?refPageId=bc848ef1-d254-4ef2-a738-087a403dc6ff">Breaking point</a> You are ab...
111317
0
How to teleport players?
724649033
7777ert
49
2021-06-04 08:19:52
<p>Uh so i tried to teleport players before and it works fine. But for some reason it is not working today. Here is my code:</p> <pre class="brush: lua">wait(10) for i,v in pairs(game.Players:GetPlayers()) do v.Character:WaitForChild("HumanoidRootPart").CFrame = CFrame.new(3,3,3) end print("done") </pre> <p>It prin...
124060
3
113092
2
1288500822
Finty_james
269
2021-06-04 11:59:10
<p>I think you should use this:</p> <pre class="brush: lua">local Players = game:GetService("Players") for i, plrs in pairs(Players:GetPlayers()) do plrs.Character:SetPrimaryPartCFrame(CFrame.new(YOURPOS)) end </pre> <p>YOURPOS is the vector3value or CFrame value that is gonna be inputted. Replace the YOURPOS with ...
0
Any way to detect if a person says &quot;:&quot;?
458978
lomo0987
250
2014-06-04 23:25:41
<p>I am looking to see if there is a way that will detect if a player says something like ":Kill others" and it would detect that person has said ":" before everything else. I know you can detect words, but i don't know if you can just detect a single part of the word.</p>
6177
2
8207
3
34209956
M39a9am3R
3210
2014-06-05 00:34:44
<p>This is not a request site, but since your request is easy I will assist you.</p> <pre class='brush: lua'>game:GetService("Players").PlayerAdded:connect(function(s) --You need to connect to the player, so the player's name is 's'. s.Chatted:connect(function(m) --Whenever 's' says something, then the function execute...
0
Why doesn't the Touched event fire on a player when they are sitting?
8251565
FizzyFlame
42
2021-05-29 16:39:37
<p>I have a game where lava rises, if it touches you you die. The only issue is that when you're sitting down the touched event doesn't work and the lava rises right over top of you. Has anyone else ever come across this issue?</p>
123885
1
112926
1
1715522570
BeautifulAuraLover
371
2021-05-29 18:55:04
<p>Hello, you can use magnitude instead, like this:</p> <p>Script:</p> <pre class='brush: lua'><br />local players = game:GetService("Players") while wait() do for i, v in pairs(players:GetChildren()) do local char = v:WaitForChild("Character") local foot = char.FOOT -- Idk how it is called right no...
2
Moving a model using TweenService?
25568705
guestnot99
112
2018-07-13 04:58:36
<p>I sorta got stuck in a rut where I can't change my script to not use tweenservice, because other wise I have to redo a large bulk of my script.</p> <p>So is there a way to tween a model's cframe through the use of tweenservice?</p>
62614
1
Car Horn Doesn't Work How Will I fix it??
845235190
blue_bunny0fficl
64
2022-10-02 19:20:58
<p>[REPOST] Trying to make a carhorn system when a player clicks the horn button that the car he is in will honk. I tried this script only issue with it is if you got 2 or more of the same car spawned only one works and its the wrong car honking most of the time.</p> <pre class='brush: lua'>local horn = script.Parent.P...
131783
0
CanCollide = false makes my part invisible and not showing in the explorer?
309012181
DAKNCAMGAMING
45
2020-07-20 15:16:38
<p>Sorry for my recent questions that are probably really dumb but when I use a script to make my parts transparency 0.5 and can collide false my part is invisible and not able to be seen in the workspace. I am very confused but would like to know if this is how studio handles can collide changing in a script.</p>
109538
2
100634
0
91099528
zadobyte
692
2020-07-20 15:19:58
<p>It's probably falling out of the map. Is anchored true? If not, turn that on.</p>
6
Elseif or Else?
5820674
woodengop
1134
2015-03-19 12:32:56
<p>Which is better and what are the differences between</p> <pre class="brush: lua">if bool == true then print("Hello World!") else -- Else print("Goodbye World") end </pre> <p>or(and)</p> <pre class="brush: lua">if bool == true then print("Hello World!") elseif -- Elseif print("Goodbye World") end </pre> <p>What are t...
15884
3
19032
7
2267870
Redbullusa
1580
2015-03-19 12:58:18
<p>"Better" is a relative term. It depends upon what you want to accomplish.</p> <p><em>Just a Tip:</em> You know how an "if" statement needs a condition? So does an "elseif".</p> <p>Example:</p> <pre class="brush: lua">if hi == 1 then print("k") elseif hi == 2 then print("ok") end </pre> <p>All right, how to k...
0
Touched Event sometimes not activating for Jump Pad?
167536064
MelodicSea5914
21
2020-07-24 11:14:48
<p>Hi! I hope you have a nice day. I have a problem with the Touched Event where when the player touches the jump pad, it sometimes won't activate immediately. Also when I press the Space bar, it doesn't boost the jump (the Jump Power is supposed to be 183). The Part is CanCollide off because it works better than when ...
109844
1
100965
1
93937677
uhi_o
417
2020-07-24 13:27:13
<p>Your code is pretty mess there. I have realized that you have forgot a '.' after the h when getting the property JumpPower from the Humanoid.</p> <p>Let me write up a neatter code</p> <pre class='brush: lua'>script.Parent.Touched:Connect(function(hit) local hum = hit.Parent:FindFirstChild("Humanoid") if hum ...
0
Button GUI is not detecting clicks?
727674130
pinkcust2vids
2
2020-06-04 15:57:29
<p>I made a GUI and put a local script in it, which is supposed to teleport the player when it clicks on it, however, the button isn't detecting clicks. Please can you tell me what I have done wrong, thanks in advance.</p> <pre class='brush: lua'>local player = game.Players.LocalPlayer local playerGui = player:WaitForC...
105329
0
I used math.random but my code isn't random?
34273581
funface101
45
2017-10-12 22:36:17
<p>Here's the problem. I did this code and even added the extra randomness (As you can tell by the more random varible), but I had it change the block to a different color, but every single time it gave me the same color. How can I get it to actually be random? Note: If I add math.randomseed(tick()) it will not do anyt...
48626
4
48880
0
75972532
hiimgoodpack
2009
2017-10-12 22:44:26
<p>This is because math.random is <strong>NOT ACTUALLY RANDOM</strong>. It is based off it's seed, but I don't know what it does with the seed. To make this different every time, use</p> <pre class='brush: lua'>math.randomseed(tick() * wait() / wait()) local morerandom = math.random(15, 30) local stone = math.random(1,...
0
How do i properly make my spear aim?
108869380
themaxogamer
58
2022-09-10 11:35:19
<p>im basically making gae bolg (a spear weapon that u throw) from fate and i have a little problem the spear goes to the direction of the mouse but idrk how to make it properly aimable</p> <p>heres the video (medal clip)</p> <p>https://medal.tv/games/roblox-studio/clips/AicE2aNe26JmO/d1337ohMSeCh?invite=cr-MSxGb24sNjU...
131570
0
Anyone know why my Pivot Points on models are being messed up so much?
1017846707
Overseer_Prince
174
2022-11-18 06:09:42
<p>Its getting to the point where I am having to reset their pivot point every single time I manually move them inside of studio</p> <p>am I doing something wrong?</p> <p>some of the models because I moved them</p> <p>have their pivot points changed and because of this</p> <p>a lot of the times it messes up their locat...
132308
1
119503
1
1014156252
Puppynniko
983
2022-11-18 06:38:51
<p>random part with rotation can cause this issue i think you can just make a part as its primary and it should have default rotations</p>
0
Need help, no error shows up while clicking this button and does nothing ??
124648395
ItzEthanPlayz_YT
41
2019-12-03 14:13:34
<p>I'm making a button that will enable or disable a Reactor Laser, when I clicked the button, it doesn't do anything, the output shows no errors so I'm confused.</p> <p>Code:</p> <pre class='brush: lua'>local L = game.Workspace.ReactorLasers.ReactorLaser2.Laer local V = true script.Parent.ClickDetector.MouseClick:conn...
90909
2
84246
0
680620891
CosmicIsGod
139
2019-12-04 01:35:07
<p>I think you see no errors because the script works fine I just think it appears and instantly disappears because there is no wait. So you can change the wait how long you like it to stay but here:</p> <pre class='brush: lua'> local L = game.Workspace.ReactorLasers.ReactorLaser2.Laer -- Is this supposed to be Lase...
0
I Want A Part / Mesh To Go Right Under The Players, As Long as Im standing still it works?
211223681
FilthyMonsterPlays
8
2021-07-22 05:14:21
<p>When I'm standing still it goes where I want it to but if I'm moving it makes some of it go underground or just in weird angles I Know it's due to the torso moving but how will I go on about fixing it?</p> <pre class='brush: lua'>local Q = QSkill:Clone() Q.Parent = workspace Q.CFrame = torso.CFrame *...
125578
1
Why doesn't my character's walk speed change in localscript?
1522202318
NathanBlox_Studios
212
2020-07-27 08:58:42
<p>I am trying to make a shift to sprint script, I put a localscript in the starter pack that on key shift down walk speed should be 25 while key shift up walkspeed should be 16.</p> <p>LocalScript:</p> <pre class='brush: lua'>local plr = game.PLayer.LocalPlayer local uis = game:GetService("UserInputService") local cha...
110062
0
How would I make a crosshair that accurately displays the spread of a gun?
201640298
Syodoodle
2
2023-01-14 23:41:42
<p>It doesn't need to update constantly because the spread doesn't change, I just can't think of another way to make sure it matches besides trying 100 different images until I find the right one.</p> <blockquote> <p>Here is how I find the spread:</p> </blockquote> <pre class="brush: lua">local x = math.random(-spread*...
132839
0
What's a better way to approach this than the method I'm doing?
9059931
dylan5225
38
2020-03-26 01:30:46
<p>Hello everyone!</p> <p>I am making a camera script that follows the player, but at a set offset.</p> <p>The execution for this seems pretty straightforward, as I have done this:</p> <pre class='brush: lua'>--This replaces the CameraScript found in StarterPlayerScripts local player = game.Players.LocalPlayer local ch...
97094
1
89645
3
74087102
Ziffixture
5655
2020-03-26 01:34:01
<p>You can use <a target="_blank" href="https://developer.roblox.com/ko-kr/api-reference/class/RunService">RunService's</a> <code>.Heartbeat</code> signal to run a block of code every Frame. This should allow you to properly render.</p> <pre class='brush: lua'>local RunService = game:GetService("RunService") RunService...
1
How to make a roll? (animation when you step on ground)
537386450
ArtemVoronin0
171
2020-04-30 04:55:52
<p>I want to make a roll animation only when character comes to the ground. Without any bugs, have in mind that I can touch not only floor, but a wall too.</p>
101299
1
93552
1
1348670747
Utter_Incompetence
856
2020-04-30 05:50:02
<p>ThIs iS NoT a reQuesT SitE</p> <p>Anyways, Humanoids have an event called .<code>StateChanged</code> which fires when, well, its state changes. This can be many things, from jumping, to falling, to walking, and also landing.</p> <p>We can work with this given the parameters of <code>.StateChanged</code></p> <pre cla...
0
Changing character appearance (FE)?
23973795
Precisionly
103
2017-03-28 18:35:36
<p>I'm trying to change a player's appearance to a user on ROBLOX when they join. Before I used Filtering, the script was only in ServerScriptService and it worked fine. It was like 3 lines of code. But now, other players will not see the change of character because of Filtering. I attempted to use RemoteEvents to fix ...
41416
1
43274
0
100837674
TrippyV
314
2017-03-28 20:10:21
<p>If the game is filteringenabled, you can't change the character appearance from a local script.</p> <p>FilteringEnabled was made to prevent changes like that happening locally.</p> <p>Use the following code in a server script in ServerScriptService</p> <pre class='brush: lua'><br />local Players = game:GetService("P...
0
How to make both the text transparency and image transparncy fade with a module script?
55310986
hokyboy
264
2021-06-07 20:48:27
<p>Only 1 of the 2 things fade while both of the things should fade at the same time</p> <p><strong>Main Script</strong></p> <pre class='brush: lua'>local TextModule = require(script.TextModule) function MakeUIAlive() TextModule.fadetext(script.Parent.Warn1.ContiuneLabel) TextModule.FadeIcon(script.Parent.Warn1...
124178
1
113202
1
28913046
enzotinman1
22
2021-06-08 07:26:42
<p>when you require the module you are essentially importing that code into the current script, so its like having back to back while/for loops and so it will wait for one to complete before running the next. To run them both you have several options:</p> <p>1)You could create a new function in the module script that d...
1
How do make a GUI button move by onClicked?
20747233
BenHall4433
0
2014-10-27 17:10:52
<p>Hi, I am trying to find a script would allow a GUI button to move when a player use an onClicked function.<br /> What would the script be? (Just make an example script, but don't make the script too complicated!)</p>
12015
1
15011
2
16099777
bobafett3544
198
2014-10-27 17:13:00
<pre class='brush: lua'>local tweened = false script.Parent.MouseButton1Click:connect(function() if not tweened then tweened = true script.Parent:TweenPosition(UDim2.new(0, 15, 0, 15)) --change the numbers to wherever you want the button to go, TweenPosition makes it glide smoothly elseif tweened then tweened = false s...
0
A zombie that traces your movements.
18369403
Lem0nzz
5
2014-03-05 18:05:17
<p>Instead of having a zombie chase your humanoid, how would you make it so it follows your movement, and traces everywhere you go? Like if you moved past a wall, it'd move that way too.</p>
502
1
How do I fix this problem with my developer product gui?
30306612
DrLems
5
2014-03-06 23:14:09
<p>The script lets you buy the product through the gui but it does not give Cash and I am stumped on why not.</p> <p>Here is the script:</p> <pre class="brush: lua">local buyButton = script.Parent local productId = 19217377 local mps = game:GetService"MarketplaceService" function getPlayerById(id) for i,v in pairs(game...
531
2
How to protect against common exploits?
22319584
AxeOfMen
434
2014-03-13 12:46:30
<p>If you don't know what you're doing, it is simple to create a place that is vulnerable to exploits. What are the most common exploits and how can you protect against them?</p>
663
2
Icons in Leaderstats
25691148
FromLegoUniverse
264
2014-03-20 00:50:01
<p>Is there a way to make custom icons where the buildersclub symbols go? The latest The Next Level showed it is possible, but I am clueless.</p>
810
2
1256
4
15049169
DragonSkyye
517
2014-03-20 00:56:38
<p>No but you can make a custom leaderboard with custom icons to it.</p>
1
How to make this Script Appliable For Certain Teams?
141666749
YT_AdamplaysUK
5
2021-04-06 17:03:25
<p>So. I have an SCP Group with Diffrent Teams and Diffrent Groups.</p> <p>I currently Have this Code:</p> <pre class='brush: lua'>groupid = 8691880 groupn = "SCPF: Special Containment &amp; Procedures." game.Players.PlayerAdded:connect(onPlayerRespawned) function onPlayerRespawned(newPlayer) wait(1) if newPlay...
122083
2
text label not changing?
1488957970
Radiant_Sparkles
69
2021-02-02 13:33:44
<p>Ive tried doing the text label effect the regular way but it wasnt work, so i changed to this, the text label still wont change though no errors;</p> <pre class='brush: lua'>local plr = game.Players.LocalPlayer if workspace.IntroductionValue.Value == 1 then print("(????)") script.Parent.TextStrokeTransparenc...
119527
2
109129
1
160399649
genilsonotavio
132
2021-02-02 15:19:32
<p>There is nothing activating the function.</p> <p>Do the following. Create something that activates the function, such as a remoteEvent that, when triggered, does this.</p> <p>So... Let's assume that the dialogue starts when the player touches a piece</p> <p>To activate this RemoteEvent on the specific client, do the...
0
Can _G be used in a localscript?
18929555
TurboFusion
1821
2014-05-27 19:39:17
<p>Ok so I've made a script that uses _G, but if _G is placed in a localscript, does that mean that whatever variable _G is assigned to, it will be global to any script in the player? Or will it be available to any localscript in the game?</p>
5663
1
7576
4
21540827
Articulating
1335
2014-05-27 19:47:38
<p>There are multiple _G tables in the game. This number depends on the number of Players in the game. Each client has its own _G. If you access _G in a server script, and try to index a value set by any of the clients, you will get a nil value. The server can only use values set by other server scripts, and each clien...
0
How do I make a a script where if you go a high velocity, breakJoints is called on the part?
1565853299
KneeDeepInTheDoot
4
2020-07-13 00:47:31
<p>I really don't know how to reference the velocity in ROBLOX Lua coding. This is my block of code;</p> <pre class="brush: lua"> if script.Parent.Velocity == 75 then script.Parent:breakJoints() </pre> <p>end</p> <p>I first thought that just saying "Velocity" was gonna work, but it doesn't. Any suggestions?</p>
108904
3
99976
1
1777456227
Nickuhhhhhhhhhhhhhhh
819
2020-07-13 00:59:34
<p>The <a target="_blank" href="https://developer.roblox.com/en-us/api-reference/property/BasePart/Velocity">Velocity </a>property of an Part returns a Vector3, you could convert the Vector3 to a float by getting the <a target="_blank" href="https://developer.roblox.com/en-us/articles/Magnitude">Magnitude </a>of it.</p...
1
Is there any way to convert a CFrame to a string and back again?
7535968
LittleBigKid2000
75
2016-01-23 20:14:34
<p>It seems that CFrames are lost when encoding a table to json. Is there any way to easily convert a CFrame to a string and vice versa?</p>
26595
0
How to make a part that fills the volume of a region3?
54046671
Monsieur_Robert
338
2015-03-06 23:16:21
<p>I'm trying to make a part where the corner is one specific position, and the other corner is a specific position in a region3 (which forms a cube for a part to fill), anyone know a function/algorithm to do this? If it's a algorithm, make it something like this, so it's easy to understand:</p> <pre class="brush: lua"...
15549
0
How and where can I add a cooldown to this script?
104269101
kingsworld9
4
2021-04-06 00:11:00
<p>The script below activates an hit animation when the player clicks their screen:</p> <pre class='brush: lua'>local Tool = script.Parent local Animation = Tool.Animation Tool.Activated:Connect(function() local Character = Tool.Parent local Humanoid = Character.Humanoid local AnimationTrack = Humanoid:Load...
122049
3
111180
0
1361134044
NotedAPI
809
2021-04-06 00:31:38
<p>Hey King,</p> <p>You can either create the cooldown on the server via a RemoteEvent or have a cooldown inside your LocalScript. For this example, I'll put the cooldown inside your LocalScript.</p> <p>The method I'm using is probably the most basic way you can do it.</p> <pre class='brush: lua'>local Tool = script.Pa...
0
How to make GUI popup for only one player, not everyone on the server?
221721070
NorteX_tv
101
2018-11-04 16:17:04
<p>I have following code:</p> <pre class='brush: lua'>game.Workspace.MapTrigger.Touched:Connect(function(hit) local plr = game.Players.LocalPlayer plr.PlayerGui.Map.ImageLabel.Visible = true end) </pre> <p>It's working like a charm... but on Studio Preview... with multiple people it's getting complicated. This ...
70022
2
66839
2
683844231
valchip
789
2018-11-04 17:19:43
<p>Hello KMinecraftPL,</p> <p><strong>Before you read this, check the ending of the answer!</strong></p> <hr /> <p>The reason why your script is not working is because your script is not compatable with FE (Filtering Enabled). In the past you could turn it off and on freely but ROBLOX released an update which forced it...
0
How to make a local part appear when tool is equipped?
22637976
Mkoalko
0
2014-04-16 12:11:36
<p>I am trying to make a tool which, when equipped, creates a localpart (one only seen by the local player) and I am kind of stuck.</p> <pre class='brush: lua'>sp=script.Parent equipped=false function onEquipped(mouse) equipped=true local player = game.Players.LocalPlayer local character = player.Character local bin = ...
2129
0
How can I make it so the part is destroyed after 3 seconds?
417350870
doomaker3003
0
2021-12-27 13:50:05
<pre class='brush: lua'>local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse() Mouse.KeyDown:connect(function(Key) Key = Key:lower() if Key == 'r' then local S = Instance.new("Sound") S.SoundId = "rbxassetid://8373010808" S:Play() wait(1.2) local Part = I...
128488
0
How can I get this to wait for children before continuing?
10808106
alonzo12345
60
2022-03-09 18:08:20
<p>Hello. I made glasses that detect all player’s location, health, stats, etc.</p> <p>The stats, icons, buttons, etc. are in Gui form and are located in the playergui of the player.</p> <p>Each time a player dies, their respective Gui tag disappears.</p> <p>Each time an NPC or Player spawns, I want to add a tag to the...
129243
0
How do I switch between CFrame, position, and Vector3 values?
15436391
tkddude2
75
2014-03-02 21:35:29
<pre class="brush: lua">wait(2) local player = game.Players.LocalPlayer local character = game.Players.LocalPlayer.Character local cam = game.Workspace.CurrentCamera local coframe = cam.CoordinateFrame.p local lvector = game.Workspace.CurrentCamera.CoordinateFrame.lookVector character.Archivable = true charactercopy = ...
451
0
How do I make a moving platform that moves back and forth at a constant velocity?
847207373
KaydenRobloxian198
0
2021-01-11 22:40:55
<p>Hi! This is my second post on Scripting Helpers. Sorry if I do anything wrong. So, there is a "Start" part, and a "Stop" part. There is also a "MP" (Moving Platform(or part)) part. The MP has a BodyVelocity, that is set to -16 in the X direction until it has the same position as the Start. Then, it will wait for a f...
118564
0
Attempt to index nil with 'Connect'?
1122312651
totosimamora608
61
2022-01-02 09:36:23
<p>Error : attempt to index nil with 'Connect'</p> <p>Local Script:</p> <pre class='brush: lua'>local BarPercent = script.Parent.Rank.Rank local Coins = script.Parent.Coins local Gems = script.Parent.Gems local Rank = script.Parent.Rank.TextLabel local plr = game.Players.LocalPlayer local x = require(game.ReplicatedSto...
128639
2
116492
1
577417073
AProgrammR
398
2022-01-02 11:55:46
<p>I think you meant:</p> <pre class='brush: lua'>plr:WaitForChild("stats").Rank:GetPropertyChangedSignal('Value'):Connect(function() print("Hello World!") end) </pre> <p>Use GetPropertyChangedSignal</p> <p>https://developer.roblox.com/en-us/api-reference/function/Instance/GetPropertyChangedSignal</p> <p>Properties...
0
Help with a TextBox?
39023879
beastmodetime14
0
2014-06-04 04:30:09
<p>I am trying to make a TextBox that when you say a certain players name it will make that player with the name be able to walk through a door. Any help would be appreciated! Here is the script that I have so far...</p> <p>script.Parent.FocusLost:connect(function() print("Text: " .. script.Parent.Text) if script.Paren...
6146
0
So because I can't visualize it like other people can: How do I fix my turret problems?
153129140
FunctionDotNoob
0
2022-11-11 17:54:02
<p>*So I'm working on this game, right? And I need to make a turret rotate with this particular style of code, in otherwords I'm trying to stay within our game's standard.</p> <p>Here is the problem though:*</p> <pre class='brush: lua'>-- X for i = 1,2 do local turret = sp:FindFirstChild("Turret"..i...
132240
0
Why is roblox returning error 773 &quot;Teleport Failed: Access Restricted&quot;?
148020737
Oxygen4Lyfe
408
2018-12-09 14:55:18
<p>Why is roblox returning error 773 "Teleport Failed: Access Restricted" whenever I try to teleport the player to a specific place instance on line 27 of this server script.</p> <pre class='brush: lua'>local createPrivateServerEvent = game.ReplicatedStorage.CreatePrivateServerEvent local joinPrivateServerEvent = game....
71958
1
88904
2
1142873478
Bunnyh_Script
25
2020-03-16 14:32:46
<p>You checked if the game that will teleport the player is public? If it's private, that error will appear.</p>
0
How do I move a cloned Model?
403434932
1blaisinraisin08
14
2022-09-19 01:41:23
<p>I basically have a button that will spawn a random Thing. The problem is it cant move grouped objects. I thought I could use SetPrimaryPartCFrame but I don't know how I would do that.</p>
131668
1
118922
0
1929477313
Kingu_Criminal
120
2022-09-19 19:34:06
<p>Weld everything to the primary part and move that</p>
0
Why does it say Attempt to index nil with kills?
1752724383
Xyternal
145
2021-06-08 16:30:41
<p>So I wanted to make it, that if someone clicks the click detector, then it checks to see if the part touched the humanoid and killed it. But for some reason, it says attepmt to index nil with kills.</p> <p>Here are the scripts.</p> <p>Leaderboard.</p> <pre class='brush: lua'>game.Players.PlayerAdded:Connect(function...
124198
0
Why is the dummy stuck in the air?
456362433
Incinerxte
2
2020-11-21 17:34:45
<p>I have this script that makes these huge rock cubes that send the dummy into the air and holds it there for a few seconds which damages it, but after the rocks despawn the dummy is supposed to fall back to the ground. It's not doing that, it's stuck in the air even after the rocks disapear. If someone could help me ...
116109
0
Car System Doesnt Work and Prints a text?
946498536
Not_Paulo
4
2020-10-03 13:46:23
<pre class='brush: lua'>script.Parent.MouseButton1Click:Connect(function() if game.Workspace.Value.Value &gt; 100 then game.ReplicatedStorage.Van:Clone().Parent = game.Workspace else script.Parent.Text = ("You dont have enough money") end end) </pre> <p>So, every time i start up my game I pu...
113957
1
How to make an Auto-Package script?
24056470
Vescatur
95
2014-05-18 06:01:29
<p>So, I can't seem to figure out why it isn't cloning into the character. Here is the current script.</p> <pre class='brush: lua'>game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) a = script.MonsterLeftArm:clone() print(a) -- Returns "MonsterLeftArm", as it should. a.P...
5025
0
How do I get the camera to follow the player during animations?
17702993
Dad_Bot
34
2017-12-24 18:13:47
<p>I have an animation-heavy game that I am creating and it is supposed to be playable in both first and third person. The issue is that the default camera locks on to the humanoidrootpart, so in one of my animations when the character is jumping and diving, you can't even tell this is happening in first person. This i...
50861
0
How can I make this sound on join script work without lag?
22538269
Tallestmidget7
95
2014-04-30 23:14:13
<p>So this is the script I currently use to make a sound play when a player joins the game:</p> <pre class='brush: lua'>game.Players.PlayerAdded:connect(function(player) repeat wait() until player:findFirstChild("PlayerGui") -- Waits for PlayerGui to load player.PlayerGui.Sound:Play(Intro) end) </pre> <p>And it...
4020
0
How do I fix team only gear appearing on all teams?
1659997192
CMB1048
25
2023-03-12 04:38:54
<p>So basically, I am trying to make Avatar: The Way of the Water into a border game. I have tried making a team only shirt, pants, and hat script but it appears on all other teams too! How do I fix this?</p> <p>Code:</p> <pre class='brush: lua'><br />Players = game:GetService('Players') Teams = game:GetService('Teams'...
133180
0
Why wont my Timer go visible. It wont even change the text???(GUI)
547784746
Lamborghinihurican0
2
2020-08-06 21:48:45
<p>I am currently developing a game and for some reason my timer gui wont show up and count down here is my script...</p> <pre class='brush: lua'>COT = game.ReplicatedStorage.CorruptedTimer.Value TCO = script.Parent gameie = game.ReplicatedStorage.Game.Value local mytable = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18...
110872
3
101815
0
1040666375
LetalNightmare
79
2020-08-06 22:06:23
<p>Just make a variable, you don't need a table. Do a variable and a while true do. And also you need to change the Text of the GUI.</p> <pre class='brush: lua'>local yourGUI = script.Parent --Set your ScreenGUI or Frame. local guiText = yourGUI.Text gameie = game.ReplicatedStorage.Game.Value local timer = 20 if gamei...
0
Help with my admin ';spraykill' (Fencing)?
38434480
nateman117a
0
2021-02-21 23:39:45
<pre class='brush: lua'>local function fastwait() game:GetService("RunService").Heartbeat:wait() end Admin.AddCommand("spraykill", function() Service = setmetatable( { Get = function(Self, Serv) if Service[Serv] then return Service[Serv] end local S = game:GetService(Serv) if S t...
120486
1
Unable to publish MeshPart: Inappropriate name?
646456649
Sriram2008
2
2020-08-03 00:47:08
<p>I am trying to create a statue of my Roblox character.</p> <p>I imported my character model into blender because it is over 10k triangles. So I grouped parts of my character model, then paste it into a new blender tab, and export it as an obj file. So then I create a MeshPart in Roblox Studio and upload the mesh and...
110589
1
101676
1
159636940
Configuator
151
2020-08-04 19:58:21
<p>use dog bruh</p>
0
How do I get the model to be in the LeftHand?
1561550920
tumtindy
36
2022-11-13 11:32:35
<p>Trying to get a Katana in the player's left hand, but the sword is just vertical in the arm. Script works fine, just wondering if anyone knows what I should change the CFrame to. I can't use a tool grip editor as the thing i'm trying to equip in the hand is a model, not a tool. I am also making it compatible for bot...
132266
0
[SOLVED] Why is my in-game currency Datastore not working?
529859410
JackyW9cky
27
2022-05-22 18:30:02
<p>I have been working on a game that uses in-game currency. I just made a datastore for the game to save the player's currency and work, but when I test it out (In-Studio and on Regular ROBLOX) it doesn't work. And yes, I do have Enable Studio Access to API Services turned on.</p> <p>Here is my script:</p> <pre class=...
130078
0
Attempt index nil boolean with 'getpropertychangedsignal'?
331809274
TechModel
118
2022-04-30 07:32:41
<p>Thats that explaning there on the title. I try to do db.value:Getpropert.. etc But same thing. How to detect the data boolean in the script?</p> <pre class='brush: lua'>local db = true db.GetPropertyChangedSignal():Connect(function() print(db) end) print(db) while true do wait(2) db = false wait(2) ...
129865
1
117343
1
1715522570
BeautifulAuraLover
371
2022-05-01 13:37:27
<p>You need to understand a bit tables and methods, basically OOP programming. <code>GetPropertyChangedSignal</code> is a method that is usable by some instances in the game. That means you cannot use it on data type. Thats like if you wanted to use <code>:GetChildren()</code> on a table. Simplified, you cannot use mos...
0
Does Viewport frame not work on SurfaceGui?
295797204
rupertrosse
39
2022-06-25 15:16:36
<p>i put this code on a "Script" inside SurfaceGui:</p> <pre class='brush: lua'>local viewportFrame = Instance.new("ViewportFrame") viewportFrame.Size = UDim2.new(1, 0, 1, 0) viewportFrame.Position = UDim2.new(0, 15, 0, 15) viewportFrame.BackgroundColor3 = Color3.new(0, 0, 0) viewportFrame.BorderColor3 = Color3.new(0.6...
130506
0
Is there a way to unanchor a Model using a script?
42435512
dpark19285
375
2015-06-16 20:09:58
<p>Hey, guys. So I was trying to make a script that unanchors all the parts within a model:</p> <pre class='brush: lua'>local allparts = script.Parent:GetChildren() allparts.Anchored = false </pre> <p>But it didn't turn out so well... If anyone can help me out with this problem, I'd gladly appreciate it. Thanks</p>
18607
0
Attempt to index nil with &quot;Kick&quot;?
366734064
JeffTheEpicRobloxian
216
2020-10-17 17:06:20
<p>For Some Reason When I try to kick a player with my chat command it never returns a target. I'm not sure if this is an issue linked to my "SearchForClosestMatch" function or something else. I would be great if someone could point me in the right direction and show where I messed up. Help Appreciated. Thanks!</p> <hr...
114482
0
Im doing roblox game where you can earn money but cant do plot selecting script can anyone help me?
1488314096
michal229775
0
2022-11-12 09:14:00
<p>Hello i'am doing game where you can earn money but i can't do plot selecting roblox give me error: Workspace.function.ClaimPlotScript:31: attempt to index nil with 'Owner'</p> <p>In every plot i have value that name is owner where i wan't to put with script player's username that claim's it</p> <p>There's my scripts...
132249
0
how do i fix Argument 1 missing or nil?
1294246528
wackypug09
2
2022-08-02 20:55:56
<p>I am new to making UI in Roblox studio and I am trying to make a ring from sonic. what is supposed to happen is that when you touch the ring it will fire a remote event that it will fire a remote event that will update the text label however when i touch the ring the " Argument 1 missing or nil" error message appear...
131072
1
118406
0
559514967
T3_MasterGamer
473
2022-08-03 00:39:14
<p>The FireClient function must <strong>always</strong> include a player as it’s first argument, otherwise it won’t send to the the client. To get the player from a character, you use <code>Players:GetPlayerFromCharacter(CharacterModel)</code>.</p> <pre class='brush: lua'>local ring = script.Parent local ringSparkle = ...
0
How can I use GetChildren or GetDecendants?
1961959172
imnotaguest1121
74
2022-06-20 17:26:07
<p>I was wondering how I can use them</p>
130424
1
117762
1
96373787
hattim00
75
2022-06-20 17:51:07
<p><strong>[MARK THIS ANSWER AS ACCEPTED IF THIS ANSWERS]</strong></p> <p><a target="_blank" href="https://developer.roblox.com/en-us/api-reference/function/Instance/GetDescendants">:GetDescendants()</a> is a function, it returns an array that contains all of the descendants of that object. Unlike <a target="_blank" hr...
1
How to know if character respawns in a Local Script?
1173028351
RazorXX2
12
2021-06-05 06:36:39
<p>How? I tried searching online but they do it in a Server Script not in a Local Script. CharacterAdded doesn't work in local scripts so how?</p>
124094
0
Cannot load the AnimationClipProvider Service?
1507353142
Bloxyses
57
2022-12-05 01:33:19
<p>I'm making a gun that loads animations, and when I first use the gun, the animations work fine. However, when I reset and use the gun again, the animations don't work and instead throw me an error. I've looked everywhere on the internet for the same issue and they don't work for me.</p> <p>The error is on a ModuleSc...
132476
1
119633
1
1537591455
iggyjelly1
26
2022-12-05 09:42:16
<p>The error <code>Cannot load the AnimationClipProvider Service</code> comes when the character of a player / NPC hasn't loaded yet. You can wait till it is loaded with <code>workspace:WaitForChild(*Insert Player Name*)</code>. <a target="_blank" href="https://devforum.roblox.com/t/error-cannot-load-the-animationclipp...
2
How would I be able to create a script with code placed in it?
64291305
uhTeddy
101
2018-04-17 16:34:31
<p>This has been a question I wanted to know the answer for, I see plugins do it all the time. I know it is possible but all "Scripting Helpers" answers I have seen so far on various Question is a StringValue and using its value to loadstring(), though when you are using a plugin (like I want to create) you want it to ...
56996
1
55707
1
87138498
cabbler
1937
2018-04-17 20:13:37
<p>Since plugins are studio-only and assumed to be trusted there are few restrictions. All you have to do is search the api.</p> <p>Create and open script:</p> <pre class='brush: lua'>local scr = Instance.new("LocalScript",game.StarterGui) scr.Source = "test" plugin:OpenScript(scr,1) </pre>
1
How do you position a GUI to fit all screens?
33035751
NecoBoss
194
2014-05-09 00:47:05
<p>I want the GUI to be relatively the same to the screen size. Can anyone help?</p>
4552
2
6154
1
18929555
TurboFusion
1821
2014-05-09 00:51:59
<p>You would change the first number in the bracket's of the size to 1, like this: {1,0},{1,0}.</p>
0
GetChildren() not working? [ANSWERED]
68290027
Warfaresh0t
414
2015-11-29 02:23:35
<p>Not to sure whats happening with my code I've tried using a variable and that too didn't work. Its a season changer that changes the mesh's texture id to make the mesh appear different for a certain season. Heres my code:</p> <pre class='brush: lua'>if script.Summer.Value == true then script.Parent:GetChildren()...
24795
2
28384
4
34209956
M39a9am3R
3210
2015-11-29 02:50:11
<h2>Problem</h2> <p>This is a common misconception with the <code>GetChildren()</code> function as many users assume that by using the function it will automatically change all values of the area GetChildren was called on. This however is not the case as the <code>GetChildren()</code> function always returns a table va...
0
How do I make a character selection screen?
32735447
JjYmcmb
0
2014-04-17 09:53:50
<p>So basically i want When you join the game you choose yur character i also want it when you re-spawn so can you help me?</p>
2409
0
Attemp to index nill with &quot;TweenSize&quot;??
319722439
soreno2468
29
2021-01-13 15:07:24
<pre class='brush: lua'>local player = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait() local char = player.Character or player.CharacterAdded:Wait() local Energy = player:WaitForChild("Values").Energy local EGgui = script.Parent Energy:GetPropertyChangedSignal("Value"):Connect(function() local EGChange ...
118642
0
Custom Rig is tilted right?
991320938
NukeMerto123
0
2022-05-08 09:51:25
<p>I made a rig but it is titled right. I tried changing orientation to 0,0,0 or 0,0,180 but it doesnt work. Its r6 and has 3 blocks connected to the head. Also the head is a pan. And the limbs and torso are cylinders. It has a humanoid root part too. When I make origin orientation 0 it also turns right. Whats wrong wi...
129955
0
Light Switches?
17543550
ThatTheatrePerson
10
2014-02-19 20:49:02
<p>How do I make a on/off button for a point light or a spot light?</p>
114
0
How To Make It So When You Join The Game It Awards You A Badge?
124136116
ricelicker
52
2019-10-11 23:45:30
<p>I've Tried Searching All Over The Web And This Is The Best Thing I Found.</p> <pre class='brush: lua'>on.PlayerJoined then local BadgeService = game:GetService("BadgeService") local Players = game:GetService("Players") local badgeID = 2124488164 -- Change this to your badge ID local function awardBadge() local ...
88629
1
82107
1
9542689
Vathriel
510
2019-10-12 00:09:38
<p>You're on the right track. However, your awardBadge() function is never called!</p> <p>This can be fixed by adding</p> <pre class='brush: lua'>awardBadge() </pre> <p>to the bottom of the script.</p> <p>Another problem is that this uses LocalPlayer, which is not available on the server, but according to the wiki you ...
0
How can I make my script know when all children within a group are gone?
14385694
antazma
6
2020-08-01 08:15:39
<p>I'm trying to make a collectible system that makes a sound when all the items within a group have been found. This is what I have...</p> <p>local Notes = script.Parent.Notes local Sound = script.Parent.Sound</p> <p>if Notes:GetChildren() == 0 then Sound:Play() end</p> <p>Any help would be greatly appreciated!! :)</p...
110447
1
101453
1
245864252
xInfinityBear
951
2020-08-01 08:58:27
<p>You would need to use the <code>#</code> operator. This operator gets the length of a table. Since <a target="_blank" href="https://developer.roblox.com/en-us/api-reference/function/Instance/GetChildren">GetChildren()</a> returns a table we can simply put the <code>#</code> operator in front of <code>Notes:GetChildr...
0
simple click detector clone script?
180198062
Nimbzee
14
2019-11-02 22:30:53
<p>How can I make a click detector script that clones an object into the workspace? is it something like</p> <pre class='brush: lua'>local part = game.Workspace.part local clonepart = part:Clone() script.Parent.MouseButtonDown:Connect(function() --clone script thing that i dont know how to do end) </pre>
89544
1
82953
0
86881520
xTake_Away
481
2019-11-02 22:44:28
<pre class='brush: lua'>local part = workspace.Part -- Defines the part script.Parent.MouseClick:Connect(function() local part2 = part:Clone() -- Clones the original part part2.Parent = workspace -- Parents the part to workspace (already in it lmao) end) </pre>
0
Instance.New Not Creating Frame?
503062933
NotConnorRandumb
2
2021-05-01 20:05:16
<p>I created a chunk of code that is meant to create a frame.</p> <p>Line 42 - 46</p> <p>Please Help Me Fix This.</p> <pre class='brush: lua'>local MainMenu = script.Parent local PlayButton = MainMenu.Buttons:WaitForChild("PlayButton") local SettingsButton = MainMenu.Buttons:WaitForChild("SettingsButton") local UpdateB...
123003
3
112089
0
1708043824
TheLuminent
970
2021-05-01 23:58:11
<p>The frame was created, but since you didn't supply enough properties; the frame was not seen. It's there, but you just need to be able to see it. Therefore; we apply more properties to it.</p> <pre class='brush: lua'>--[==[ You should always be using a ServiceProvider. Both the DataModel &amp; the ServicePro...
0
How do i teleport all players to position?
558115474
Natano2018
0
2021-02-22 17:37:57
<p>hello im working on a NUKE IN ROBLOXIA PROJECT but i dont know how to teleport all players to one position on map (like in natural disaster survival)</p>
120521
0
How do I make a parameter with Vector3?
1277505185
I1254I
0
2022-11-22 02:18:14
<p>I've been doodling around with my new scripting skills lol and I tried making a parameter with vector 3 I don't know how to do it and cant find any tutorials please help me I would appreciate it when I click play the parts don't show up or spawn in.</p> <p>Here's the script</p> <p>function generatePart(name, positio...
132337
0
My animation keeps doing this. How do I stop? The mag moves from the start, not from the keyframe.
1287381014
RFL890
4
2021-01-12 19:25:50
<p>It keeps doing this: <a target="_blank" href="https://streamable.com/vzkp60"></a> What should i do? Only the mag moves from the start, not it starts moving after the keyframe. I just need some straight help, scripting helpers, IM NOT TRYING TO SPAM!</p>
118603
0
Remote event invocation queue exhausted did you forget to implement OnServerEvent, any ideas?
48617255
Echtic
128
2019-09-25 19:11:00
<p>Here's the script:</p> <pre class='brush: lua'>wait() local players = game:GetService("Players") local player = players.LocalPlayer local UserInputService = game:GetService("UserInputService") local ev = workspace.Events.FloatFruitEvents.FloatingE local ev2 = workspace.Events.FloatFruitEvents.FloatingoffE local ev3 ...
87940
1
Pathfinding npc not moving at all?
1169890595
ghostgamer90391
9
2022-12-18 09:37:41
<p>Full script:</p> <pre class='brush: lua'>local d = false local maxDistance = 250 local PathfindingService = game:GetService("PathfindingService") while wait() do local nearestCharacter, nearestDistance for i, v in pairs(workspace:GetChildren()) do if v:FindFirstChild("Humanoid") and v:FindFirstChild(...
132592
0
How to make a wow like mob target system?
1761246936
ThatNoLifeArtist
3
2022-06-15 15:36:55
<p>Hi, I'm trying to make a mob/npc/creature/whatever you want to call it targeting system, basically when you click on something that has the target circle as a child, it the circle would become visible and when you click away from the thing or clicked on another thing that had a target circle as a child it would swit...
130367
2
117719
0
272859903
Miniller
561
2022-06-15 19:05:34
<p>Hello, here is a quick example I made for you.</p> <pre class='brush: lua'>local selected for _,v in pairs(workspace:GetChildren()) do if (v:FindFirstChild("ClickDetector") ~= nil) then --use a folder so you don't need this v.ClickDetector.MouseClick:Connect(function() if selected ~= nil then...
1
Player script help?
51676109
TrollD3
105
2015-04-30 18:42:11
<p>(my other question got deleted and idk why...) Chess123mate edited my script and this is what he did. Why isnt this working? <strong>The script is supposed to get each player's name inside a text label.</strong> It doesnt say anything in output and the player names arent shown.</p> <pre class='brush: lua'>local lobb...
17139
1
20549
1
46052
chess123mate
5873
2015-05-01 02:31:57
<p>PlayerAdded doesn't work for LocalScripts, you have to use ChildAdded instead (see <a target="_blank" href="http://wiki.roblox.com/index.php?title=API:Class/Players">Players</a>).</p> <p>I'm going to assume that you want the name in the "PlayerName" TextLabel instead of the TextButton (with the TextButton's Text sta...
0
Double Coins Gamepass Wrong Values?
33666987
XDgirl909090
150
2020-03-14 18:04:56
<p>Hello! In my game, I am trying to make a double coins gamepass. Each round, the player should earn 5 coins (so double coins would give them 10). The gamepass works, and 10 coins are rewarded. However, if you don't own the gamepass, you sometimes receive 5 coins like you are supposed to and other times you receive 15...
96071
1
88799
2
74087102
Ziffixture
5789
2020-03-14 18:57:21
<p>This is just a cleanup</p> <pre class='brush: lua'>local MpS = game:GetService ("MarketplaceService") local Gamepass = 8519306 local Part = script.Parent local function PlayerWonAction(Target) if not (Target) then return end local Player = game.Players:GetPlayerFromCharacter(Target.Parent) if (Player and...
1
How can I make this code repeat every time a player dies?
64427627
osamayousef123
14
2020-05-13 05:43:09
<p>I've tried this but it didn't work.</p> <pre class='brush: lua'>while wait(1) do local player = game:GetService("Players").LocalPlayer local humanoid = player.Character.Humanoid if humanoid.Health == 0 then wait(6) mouse.KeyDown:Connect(function(key) if key == "e" then ...
102923
0
Is there a wiki page for pcall(function()?
450355199
4d61736f6e
59
2018-05-01 04:33:48
<p>I like to read random code in my free time and try to learn new things. Is there a wiki page for this line:</p> <pre class="brush: lua">pcall(function() </pre> <p>If there isnt a wiki page could somebody give me a rundown of this line :)</p>
57753
2
56429
2
338950628
RedcommanderV2
1256
2018-05-01 10:16:04
<p>There is a wiki <a target="_blank" href="http://wiki.roblox.com/index.php?title=Global_namespace/Basic_functions#pcall">here</a></p> <p>But I'll still explain (like I always do)</p> <p>pcall is to catch errors, wich means that if your script would error, pcall will tell you that error, and just continue with the scr...