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
3
Is there a way to remove a value from a table without knowing its index?
27057428
Tortelloni
315
2014-08-21 22:05:22
<p>Hi!</p> <p>So recently, while developing my game, I've found I've used tables more than I have ever before writing standalone scripts and such, as they're generally useful for saving space, keeping a solid index, etc.</p> <p>However, I've ran into several occasions where I would have to use <code>table.remove</code>...
10051
1
12822
4
386992
BlueTaslem
18071
2014-08-21 23:00:41
<p>Lua doesn't have a "remove this value" function, probably because there's a few ambiguities in what that would mean:</p> <ul> <li>Remove <em>one</em> (which?) or <em>all</em> of that value?</li> <li>Remove by just setting to <code>nil</code> or by removing from a list? e.g. <code>{1,2,3}</code> becoming <code>{1,3}<...
0
How do i make a loop that repeats a certain action while the character is touching a certain part?
48617255
Echtic
128
2019-10-06 16:39:12
<p>So i need the loop to keep damaging the player every let's say .5 seconds while he is touching a certain part, and when he stops for it to stop as well. I am not asking for someone to make the whole script for me, i need someone to help me make it. I'd really appreciate if someone told me what to do and maybe linked...
88425
1
81932
1
151702995
RealTinCan
217
2019-10-06 19:53:52
<p>You could do something like this.</p> <pre class="brush: lua">local part = workspace.BRICK local touch = false -- Debounce part.Touched:Connect(function(hit) touch = true while touch do wait(.5) -- Delay -- Code here part.TouchEnded:Connect(function() touch = false ...
1
How do i detect and make a variable for a player that clickes?
179415119
Anderssc
22
2021-05-10 18:28:19
<p>So I am trying to make a fishing simulator game, but I need the line that gets created between the water and the rod, but I am stuck at the line from the player's rod, I could only make it so that the line appears between a specific player name, can anyone help me, please. Here is my code:</p> <pre class="brush: lua...
123310
1
112403
0
377679694
TheB4dComputer
100
2021-05-11 02:32:22
<p>Instead of checking for a player outside of the tool, I would put this script in the tool so you wouldn't have to check the player's backpack. I would also put the RodConstraint in the starterRod and not the workspace (For organization). The code should be somewhere along the lines of this:</p> <pre class="brush: lu...
1
How to call a function when an element from array is touched?
201626722
TheChi_1705
22
2020-12-18 14:21:21
<p>So I'm trying to do a script that prints something when the circle it's touched by a player. (workspace > folder > model > "Circle") But I still get the error <em>attempt to call a nil value</em></p> <pre class='brush: lua'>visible_planets = workspace.planets:GetDescendants() hidden_planets_folder = game.ReplicatedS...
117336
1
107520
1
103833540
deeskaalstickman649
388
2020-12-18 14:40:35
<p>Remember that when a function as an argument with a () is provided, that argument will be equal to what that function returns, not the function itself. The solution here is to remove the (v). The 'hit' argument will still be provided.</p>
0
How remove Models if it is empty?
124350617
robloxy0123
30
2016-08-15 11:35:03
<p>Hello, i want to remove models with the same name and i want only to delete these models when they are empty they have nothing inside how can i do this?</p>
34567
1
37195
1
1658240
patrline5599
150
2016-08-15 12:43:36
<p>Here is a script that removes empty models with a name that you set.</p> <p>Hope this helps you!</p> <pre class="brush: lua">local name = "testMod" -- name of the models you want to remove goes here while true do wait() local mods = workspace:getChildren() for i,v in pairs(mods) do if v:IsA("Mode...
0
Count down help?
33349964
KennySfromTitan
106
2015-07-30 00:54:59
<p>I'm trying to make a countdown script, but when I start it up, but it counts down from 10 to 0 in less than a second....</p> <p>Script :</p> <pre class='brush: lua'>for i=10,1,-1 do print(i) end </pre>
20633
1
24265
4
38498021
capinbuilda
15
2015-07-30 00:59:37
<pre class='brush: lua'>for i=10,1,-1 do wait(1) -- this is very important. It puts a wait time in between each time it loops. print(i) end </pre>
0
How do I change image gui by leaderstats?
1722023006
OhBrotherGaminYT
0
2021-04-08 17:46:21
<p>Hello! I am trying to change the image of the gui depending on the leaderstats. It is in serverStorage because that is where the billboard gui is in</p> <p>EDIT 1: BTW it is a overhead Gui</p> <p>Here is the code.</p> <pre class='brush: lua'>local LP = game.Players.LocalPlayer local Image = script.Parent local leade...
122155
0
How Do You Make NPCs Not Collide With Each Other?
635945143
Adv3rtizement
101
2018-06-13 01:38:28
<p>I'm making something where the npcs will walk on a path. The problem is, the npcs keep running into each other and clogging up the paths.</p> <p>In the studio, I tried turning off CanCollide in all of the body parts, but when I tested the game, I was surprised to find that the npcs were colliding with each other sti...
60232
3
Is there any other loops other than `while true do end repeat until nil for i=1,1 do end`?
17514438
TheeDeathCaster
2319
2014-06-11 23:45:05
<p>If so, I've never heard of it before, if there isn't any, I am sorry for posting.</p>
6536
3
8652
3
1312116
MrFlimsy
345
2014-06-11 23:54:30
<p>Don't be sorry for posting, that's what this website is for!</p> <p>The only thing you're missing the generic for loop. It looks like this:</p> <pre class='brush: lua'>for index,value in pairs(table) do end </pre> <p>The variables <code>index</code> and <code>value</code> can be replaced with anything. <code>table</...
2
how to control and change the camera angle?
1222281551
botw_legend
452
2020-06-12 17:06:26
<p>so i am making a gun it is completly done other that one thing... recoil how do i change the camera angle? to be clear i am not asking for how to make the gun have recoil when i shoot just asking for changing the camera angle ok i got the script:</p> <pre class='brush: lua'>local camera = game.Workspace.CurrentCamer...
106206
1
97796
1
1463376080
DaysWeeksAndMonths
90
2020-06-12 18:14:15
<p>don't know exactly what angle you want the camera to change to but there are a lot of explanations on camera manipulation here:</p> <p><a target="_blank" href="http://">https://developer.roblox.com/en-us/articles/Camera-manipulation</a></p> <p>there are a few more here too: <a target="_blank" href="http://">https://...
2
What is the best way to go about learrning Roblox physics?
63095621
tumadrina
174
2021-12-16 11:41:15
<p>For example, I would like to learn to make a curved trajectory path for a projectile that can detect objects in its way, or attacks that move in fancy ways. I already know pretty basic physics and trigonometry, but I'm just lost on how I would go about implementing it on Roblox. I feel very comfortable with Lua, but...
128277
1
116205
3
1792778813
Xapelize
2326
2021-12-16 12:32:07
<p>There's a lot of way to make custom physics engine, solutions too, but an approach for a physics engine can be complicated.</p> <hr /> <p>Aside from the bad english, here's some tip for your attempt, to make a custom physics engine, you will need to involve simulating force and detecting collisions using regions on ...
1
My punch script damages unconditionally, why?
1522202318
NathanBlox_Studios
167
2020-08-01 10:10:10
<p>I have a punch script, everything was working well until, I added the damage script. Now whenever I touch an object (even without punching), it damages the object</p> <p>My script :</p> <pre class='brush: lua'>local player = game.Players.LocalPlayer local mouse = player:GetMouse() local humanoid = player.Character:F...
110454
1
101461
1
320691098
Gojinhan
353
2020-08-01 12:48:13
<p>You're never disconnecting the touched event, which causes it to always check for hits and damage accordingly. (this is also one of the most common memory leak :P) Make a variable for the signal and disconnect after the punch should be over.</p> <p>Also, I recommend using a keybinds system along with a functions mod...
0
Camera Function Editing Character.Head decals!?!?!
358294883
LegoUnicornRoblox
37
2019-08-23 02:10:59
<p>Hello I've made this camera script, after editing the camera's posistion</p> <pre class='brush: lua'>cam = workspace.CurrentCamera plr = script.Parent.Parent.Parent.Parent.Parent chr = plr.Character script.Parent.MouseButton1Click:Connect(function() repeat wait() cam.CameraType = Enum.CameraType.Custom until cam...
86368
0
Loop inside of loop kills my game and I don't know why?
22502080
lolkid007
43
2018-04-17 01:45:04
<p>I'm experimenting with loops inside of loops and this is my first attempt, but when I click, Studio will always crash and I don't know why. Here is script:</p> <pre class='brush: lua'>loop = 1 while true do while loop &lt; 8 do wait(1) script.Parent.Parent.HingeConstraint.TargetAngle = script.Parent.Pare...
56978
1
How to offset CFrame rotation and position?
94638252
mbramblet
80
2019-12-23 19:06:55
<p><strong>So my question is this:</strong> How can I use values to offset a CFrames rotation AND position? (Preferably with Vector3s)</p> <p><strong>Here's some example code</strong></p> <pre class='brush: lua'>local V_Offset =V_Model.Offset.Value local V_Rotation =V_Model.Rotation.Value V_Model:SetPrimaryPartCFrame(C...
91816
0
How to add a Clickable Billboard GUI using KeyDown Event
25814636
XxmanwolfxX
0
2014-02-26 02:03:21
<p>My script won't work to add a Billboard GUI when you press m.</p>
307
1
How can i add a cooldown and destroy to this script?
364796628
Funnyskyswagway3
30
2020-06-25 20:31:05
<p>So i have this script that spawns a part when 'e' is pressed but i want to know how cna i make it so the part destroys after a few seconds and then the script is on cooldown</p> <p>local Player = game.Players.LocalPlayer</p> <p>local Mouse = Player:GetMouse()</p> <p>Mouse.KeyDown:connect(function(Key) Key = Key:lowe...
107426
1
How Can I Save/Load Humanoid MaxHealth And WalkSpeed?
161950547
Minecrafter09031031
16
2019-06-24 19:27:05
<p>Im Making a Game that has Speed Stats and Defense Stats, But How can i Save And Load it? Please help</p>
82428
0
How can I turn this local script to a server script?
1961959172
imnotaguest1121
74
2022-06-20 14:11:43
<p>Now before you tell on me how easy It Is, let me explain, anyway I wanted this script to be a server script, so that whenever the button Is clicked, It gives you a weapon, and It does work however Its a local script, the problem is that since local scripts are for the client side, the weapons that are given to you s...
130420
1
117758
1
96373787
hattim00
75
2022-06-20 15:08:54
<p><strong>[MARK THIS ANSWER AS ACCEPTED IF IT WORKS]</strong></p> <p>For the client to communicate with the server, you have to use something known as <a target="_blank" href="https://developer.roblox.com/en-us/api-reference/class/RemoteEvent">RemoteEvents</a>. In order for a client to send a message to the server, it...
0
How do I allow camera ghosting?
1272029006
Gmorcad12345
72
2021-05-02 08:27:45
<p>Here's what I mean by Camera ghosting: Firstly go into first person than scroll your middle mouse just a little bit backwards. In most games you'll see that your camera zoomed out a little bit and you see youself as opaque. However in some games I discover like "Jupiter's towers of hecc" and "arenoir's difficulty ch...
123025
1
ROBLOX Default Animations Interupts My Animation?
4691581
hellmatic
1502
2018-04-17 05:59:16
<p>I set the AnimationTrack priority to action, but the ROBLOX animation still over rides it. (only works for the client, not for other players)</p> <p>Filtering Enabled is on.</p> <pre class='brush: lua'>local Animation = script:WaitForChild('Animation') local AnimationTrack = nil local ActiveTracks = nil local State ...
56985
1
How do I change the text of a TextLabel with a script in the workspace?
15436391
tkddude2
75
2014-03-12 23:04:48
656
3
1082
2
21540827
Articulating
1335
2014-03-13 20:30:59
<pre class="brush: lua">local label = game.StarterGui.TimeLeft.Frame.TimeLeftLabel local ready = game.StarterGui.TimeLeft.Frame.Ready.ReadyToVisit local currentmin = currentdaymin + currenthourmin + currentminutemin local beforemin = beforedaymin + beforehourmin + beforeminutemin local timeoffline = math.abs(currentmi...
0
I'm making an elevator and I need help with the script?
32730446
DesiredToResign
10
2019-11-09 00:56:36
<p>What I want the elevator to do is wait a bit then go down and then stop and then go up and stop ONLY when it gets touched by a player, please help. Sorry if there is not much script, It's just I don't really know about CFrame and new positions.</p> <pre class='brush: lua'>local model = script.Parent local function o...
89777
1
83239
0
35709145
XxTrueDemonxX
362
2019-11-09 01:51:18
<p>As suggested by 123nabilben123, you'll want to look into the tween service. It's a very user friendly service that's incredibly simple to understand. You will need to understand about how to use CFrames and Positions a bit but most of what you'll need to know is basic math. For a great tutorial on the tweening servi...
1
How to get player's join date?
42834980
TheGreenSuperman
85
2019-02-09 23:35:26
<p>I've tried everything. I've tried devforum posts (an unknown territory for me xD), for example,</p> <p><a target="_blank" href="https://devforum.roblox.com/t/os-date-useful-but-not-here/3617/8">Getting the date and subtracting the player's account age from it</a></p> <p>which provided these module scripts, and they ...
75982
0
How can I add points to the leaderstats on the leaderboard through a ClickDetector?
18316751
ragingskull182
67
2016-12-17 16:37:12
<p>So I'm trying to make a script that adds a point to the leaderstats on the leaderboard with a ClickDetector. The problem is that it does not find the leaderstats in the LocalPlayer for some reason (as seen in the error I got:'leaderstats is not a valid member of Player'). How can I fix this so it adds a point to the...
38079
0
Is It possible to make FindFirstChild find a part with another parts name?
119380452
TFlanigan
86
2020-01-23 17:53:17
<p>so i want to find a workspace child with a folders name, for example if folder name is abc, i want it to find a child in workspace with folders name, in this case its gonna be abc.</p> <p>my english isnt too god but i hope you understand what im talking about</p>
93463
0
How can I detect if a game is running in studio (build-mode)?
9935287
Epidemiology
116
2014-08-26 00:48:52
<p>Does anyone know a way to detect if a place is running in build mode, rather than in a Roblox server?</p> <p>The following would work, but only if HttpEnabled is true.</p> <pre class='brush: lua'>local z,p = pcall(function() Game:GetService('HttpService'):GetAsync('http://api.roblox.com/') end) if not z and p == 'Ht...
10236
2
Why does the text in a ScreenGUI not change but it prints that it has changed?
617276212
kingblaze_1000
310
2020-03-21 18:07:05
<p>I wrote a code to change the text of the ScreenGui according to the text on a SurfaceGui but it doesn't work</p> <pre class='brush: lua'>local buttonLeft = game.Workspace.Entries.LeftEnter --Part in the workspace local leftValue = game.Workspace.LeftRoad.Truck.Value --BoolValue local CounterLeft = game.Workspace.Cou...
96640
1
89273
4
37652173
DeveloperSolo
355
2020-03-21 18:18:36
<p>This is because you are trying to edit the StarterGui version of the UI.</p> <p>If you edit anything in the StarterGui, it won't reflect the changes til you reset or move it to the player gui. That's why it's called the <strong>Starter</strong>Gui.</p> <p>To fix this, make the change to the players PlayerGui.</p> <p...
0
Cooldown/Debounce not working properly when using .Touched()?
850697920
1uqt
2
2022-11-22 01:01:48
<p>So basically I made a brick that when is touched, its supposed to put fire particles all over your body, play a lava sound from your HumanoidRootPart, and would finally kill you:</p> <pre class='brush: lua'>function onTouched(hit) local debounce = false if hit.Parent:findFirstChild("Humanoid") then l...
132335
1
119524
0
1014156252
Puppynniko
983
2022-11-22 01:12:16
<p>In your first script your setting debounce to false every time you touch someone so it won’t work try placing it outside the ontouched function</p>
1
Beginners and Winners Spawn Help.
6762467
Wolf8D
25
2014-03-16 14:43:55
<p>How would I place two spawns into teams?</p> <p>Also, how can I create two spawns including a Beginners and a Winners?</p>
727
2
how do I increase the size of a Part to one side only?
416059776
lytew
99
2020-04-22 17:57:38
<p>I created this script to increase the size of a Part, but I wanted it to increase in size only to one side (and not two sides as it normally is) script:</p> <pre class='brush: lua'>Game.Players.PlayerAdded:Wait() While true do wait() script.Parent.Size = Script.Parent.Size + 1 end </pre> <p>my problem is that it inc...
100300
0
I can't access LocalPlayer in a normal sript?
41120441
imperialstar
110
2015-12-18 14:08:42
<p>This..... just doesn't work. D: The debugger tells me that my 'player' variable is nil. I dunno what to do; can someone help please?</p> <pre class='brush: lua'>local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse() </pre>
25319
1
28889
2
15619704
NinjoOnline
1147
2015-12-18 14:11:18
<p>You can't access LocalPlayer from ServerScripts. If the script is inside the StarerGui, or StarterPack, then just</p> <pre class='brush: lua'>local player = script.Parent.Parent </pre> <p>This will get the scripts 'Parent' which is the StarterGui, or in this case the PlayerGui, and it again gets the parent of that, ...
0
how to get something that has a space in it?
438991969
SWBTyresse
48
2020-09-13 17:05:16
<p>a team is called "red dragon" how would I would I get that with the space?</p> <p>game.Teams.red dragon.PlayerRemoved:connect(function() this is what I have</p>
113122
1
103843
2
432744209
Baselistic
79
2020-09-13 17:07:13
<p>You need to use it like</p> <pre class='brush: lua'>game.Teams["red dragon"].PlayerRemoved:Connect(function() </pre>
1
How would you get mouse.Hit.p while ignoring certain parts?
29783818
RobustPhysics
25
2014-03-11 04:27:33
<p>For my Cero skill, the player spawns a large sphere with a bunch of lines floating towards it to create a charge effect. At the same time, the player can control the direction they are looking at by moving the mouse. Of course, I run into the problem where the player will click on one of the floating parts, thereby ...
627
2
996
2
53627646
modFrost
130
2014-03-11 13:21:14
<p>If you place the model of the sphere into the character the mouse should ignore it. If not I may be mistaken, but you gotta try right?</p>
0
How to attach an accessory to a NPC?
7626595
Roytt
64
2017-09-11 17:27:42
<p>I made this to search for a way to attach accessories but it does not work, the accessory just falls to the ground.</p> <pre class='brush: lua'>for i,v in pairs(game.ReplicatedStorage.Hats:GetChildren()) do print(v.Name) local h = c:FindFirstChildOfClass("Accessory") if h then h:Destroy() end...
47819
2
Should I use Model:PivotTo() or Model:SetPrimaryPartCFrame()?
1929477313
Kingu_Criminal
205
2022-10-02 07:55:42
<p>The question is up there... Pros and cons? I've heard <code>SetPrimaryPartCFrame()</code> moves everything to keep offset, while <code>PivotTo()</code> calls itself on descendants... Would one be slowers?</p>
131778
1
server script hard crashing my studio please help?
55885613
mohamedeatpotatoes
67
2018-04-19 12:56:39
<p>pls i have this script which keeps crashing my studio and i dont know how to fix it it is a loop that moves a part around a line its for my game pls help me</p> <pre class='brush: lua'>part = game.Workspace.skate while true do part.CFrame = part.CFrame*CFrame.new(1,0,0) part.BrickColor = BrickColor.random() ...
57077
2
55781
1
78181328
RodrigatorOP
172
2018-04-19 13:42:15
<pre class='brush: lua'>part = game.Workspace.skate while true do part.CFrame = part.CFrame*CFrame.new(1,0,0) part.BrickColor = BrickColor.random() print("debug") wait() end </pre>
2
How to deal with this? I have been sitting for a long time but I could not understand - Help
1744613578
YTBrainBroYT
29
2021-04-19 14:29:26
<p><strong>hello, I decided to continue making the game, but unfortunately I have a lot of knowledge in the IT sphere, I don’t have a mistake here</strong></p> <p>ServerScriptService.LastEquipped:27: attempt to index nil with 'Clone' - Server - LastEquipped:27</p> <p>here is the script itself</p> <pre class='brush: lua...
122552
1
111656
0
1792778813
Xapelize
1971
2021-04-19 15:01:54
<p>Usually “<strong>attempt to index nil value</strong>” errors happen when something has not loaded yet (If you have your hierarchy set up correctly).</p> <p>You can consider doing:</p> <pre class='brush: lua'> local clone = game.ServerStorage.Tools:FindFirstChild("equippedlast").Value:Clone() </pre> <p>EDIT:</p> <p>I...
1
How to get the rotation from an existing CFrame?
49773669
cowsoncows
926
2018-01-23 22:40:06
<p>I'm doing something where I'd like the player to face the direction of the camera at all times. In this case, I cannot use any of the existing CameraTypes, as I am doing it in first person and the way that I've scripted the camera now prevents the player from turning when the camera is moved, like it normally does.<...
52576
1
51991
0
149258954
RayCurse
1513
2018-01-23 23:27:48
<p>In order to get the rotational part of a <code>CFrame</code>, all you have to do is subtract the position from the <code>CFrame</code>. Then, you can apply the rotation to the existing <code>CFrame</code> of the humanoid root part using the <code>*</code> operator.</p> <pre class='brush: lua'>local camera = workspac...
0
How to check player's leaderstats named &quot;Points&quot;?
321511121
KoxiThePlayerPL
37
2020-01-26 10:11:48
<p>So I'm making a clicker game, and I want to do ontouched event to unlock new shop, but I don't know how to check player's current leaderstats :/ ... I want to destroy the wall if success and subtract player's points. (50B)</p>
93620
0
How would I make two GUI's visible and invisible during their appropriate times?
490487562
SheepeySheeps
4
2020-06-24 03:42:50
<p>How would I make my make my separate GUI's only visible during their appropriate times. For example when intermission is going on my GUI signaling intermission has to visible why'll the round GUI with the round stats would be invisible and visa versa. How would I do this?</p>
107266
2
98659
0
984384728
RebornedSnoop
170
2020-06-24 04:16:06
<pre class='brush: lua'>local gui = "define your gui" gui.visible = false </pre> <p>this is how u make the gui invisible and for visible just set it to true.</p> <p>then u can check if it is during intermission , not sure how to because i do not know how do you even start your intermission.</p> <p>sorry i dont understa...
0
How would you make a gui connect to a player?
328413134
LiLFriks
39
2018-02-20 03:15:30
<p>I'm trying to figure out how to make it so that if a player buys a knife and equips it, it puts it on the player's back. As an example, in games like murder mystery 2, if players click the knife they want to equip, it puts it on their back.</p>
53994
0
i was coding a tower defense game and I cant seem to get the moving script right?
220100967
Emereldboy
0
2022-05-04 22:02:16
<p>local zombie = script.Parent local waypoints = workspace.waypoints</p> <p>for waypoint=1, #waypoints:getchildren() do zombie.Humanoid:MoveTo(waypoints[waypoint].position) zombie.Humanoid.MoveToFinished:Wait() end</p>
129913
1
When should you use vector3 instead of CFrame ?
1017846707
Overseer_Prince
188
2019-05-25 05:05:23
<p>I don't understand how they're different I heard that vector3 u can't place when there's already a part at the position but I tried it and I did become able to place a part inside a part in. a position. So when is it advised to use Vector3 over CFRAme and Cframe over vector3</p>
80680
2
75076
1
572995537
The_Pr0fessor
595
2019-05-25 05:15:05
<p>Well Stack edit isnt working rn btw</p> <p>Vector3 is just positioning along X,Y,Z Axis</p> <p>CFrame is capable of positioning in a similar way to Vector3 but with rotation</p> <p>When u want to position something relative to the workspace use vector3</p> <p>when you want to position something relative to an object...
0
Z cannot be assigned to?
1122312651
totosimamora608
61
2021-08-31 12:06:51
<p>so i want a part to stick to the other part but it says Z cannot be assigned to</p> <pre class='brush: lua'>while true do script.Parent.Position.Z = script.Parent.Parent.Part2.Position.Z - 1 end </pre>
127069
1
115394
0
219106167
Neatwyy
123
2021-08-31 12:14:56
<p>You can't change the z value of a position, you would have to do this instead.</p> <pre class='brush: lua'>while true do local pos = script.Parent.Parent.Part2.Position script.Parent.Position = Vector3.new(pos.X, pos.Y, pos.Z - 1) wait() -- Don't forget the wait() end </pre>
0
respawn player on touch?
1183422777
7_Fig
0
2020-03-04 15:37:38
<p>how do i make it so when a player touches a brick they get respawned?</p>
95554
2
88281
1
714312166
PrismaticFruits
842
2020-03-04 16:05:03
<p>The above answer will kill the player. But if you want to make the character instantly respawn without falling apart you would use this:</p> <hr/> <pre class="brush: lua">script.Parent.Touched:Connect(function(hit) local player = game.Players:FindFirstChild(hit.Parent.Name) if player then player:...
3
Does Lua support OverLoading functions? (Two identically named functions with different parameters)
1684846
Necrorave
560
2015-11-25 04:49:32
<p>Hey guys, I was wondering if Lua or Roblox supports the idea of having multiple functions with the same name <strong>but</strong> different parameters.</p> <p>Example:</p> <pre class='brush: lua'>function add(one, two) --Code end function add(one, two, three) --Code end </pre> <p>Using the above example, wou...
24647
2
28231
7
3508838
DigitalVeer
1473
2015-11-25 05:20:22
<p>I believe you meant to say <strong>overloading</strong> and not <strong>overriding</strong> and the answer is <strong>no</strong>. Lua believes that the function is being redefined and will only use the most recently defined function.</p> <p>Example:</p> <pre class='brush: lua'>function add(one, two) print(one+t...
3
Make arms follow mouse (Like FPS)?
49168564
Hero_ic
502
2015-05-19 02:16:17
<p>Is it possible to make the player arms visible and follow the mouse while in first person so it does not look like they are floating? (Like FPS)</p> <p>I hope this question is not stupid.</p>
17657
1
21126
8
1002773
Spongocardo
1984
2015-05-19 17:19:06
<p>What I do is instead of making the arms follow the mouse, I weld my arms to the head of my character, offset the welds accordingly using the C1 property of the weld (this is so that the arms aren't inside of your head when you test the gun and it may need tweaking tons of times) and then use the following piece of c...
1
Dev Products give cash multiple times? [Solved]
98401192
LifeInDevelopment
364
2017-09-24 08:37:04
<p>At this point I think its a roblox bug, but when I spam click my buy button, or the roblox buy button, or even when I buy dev products multiple times without spamming I start to get extra cash. I'm using datastores to record purchases, I've tried to save it in a table and saving it in a seperate key but when I check...
48149
0
model disappearing on touch not working?
6030494
Exsius
162
2014-03-02 20:13:14
<p>I tried to make a script that touching a part of a model will set the all the parts in the model to become transparent. I tried using</p> <pre class="brush: lua">function onTouched(hit) script.Parent.Parent.Door.A1.Transparency= 1 script.Parent.Parent.Door.A2.Transparency= 1 script.Parent.Parent.Door.A3....
446
0
can't move camera in first person?
1865523181
pakancina
14
2023-02-06 15:23:43
<p>when i go in first person in studio, my mouse is unlocked and i can't move the camera even when im holding the right mouse button. i have been having this issue for weeks.</p>
133031
0
UDim2 is not a valid member of TextLabel? (LINE 9)
46332524
Grenaderade
525
2015-05-07 23:25:09
<p>I made a script where when you have your mouse on a certain part and it shows a GUI that follows your mouse, but it won't work. Can somebody help me with it?</p> <pre class="brush: lua">local Plyr = game.Players.LocalPlayer local Mouse = Plyr:GetMouse() local Object = game.Workspace.Interact1 while true do if Mo...
17347
0
Which is more efficient? RenderStepped or While Wait() Do?
49681610
WaddelsG
69
2018-02-10 20:16:27
<p>Which would be more efficient to use? RenderStepped or While Wait() Do? Since they both look like they do the same thing.</p>
53489
0
Why are 2 functions not working? Also there's no error at the log
1663755583
vinhkhang100
0
2023-02-09 12:34:08
<pre class='brush: lua'>local function zombieSpawn(name) local clone = game.ReplicatedStorage.Zombies:FindFirstChild(name):Clone() clone.Parent = game.Workspace.Zombies clone.HumanoidRootPart.CFrame = CFrame.new(game.Workspace.RandomSpawns:GetChildren()[math.random(1,#game.Workspace.RandomSpawns:GetChildren...
133044
0
Is there a way to halt a for-loop without breaking?
5453383
ZeroBits
142
2014-07-26 01:51:06
<p>I can't find a function for this on the wiki, I need it for a user-input system on my WIP hacking game.</p>
8702
1
11277
2
386992
BlueTaslem
18054
2014-07-26 02:17:22
<p><code>break</code> is the way to break a loop. <code>return</code> also works (but obviously has extra functionality of completely exiting a <em>function</em> block instead of just a loop and giving a [set of] value[s]).</p> <p>The only other way to prevent a loop from continuing is to cause its condition to be fals...
0
Incomplete statement: expected assignment or a function call Error?
309012181
DAKNCAMGAMING
45
2020-06-14 23:48:34
<p>I am running into a problem on my sprinting script. Or the stamina part of it. I keep getting this error: "19:43:24.258 - Players.DAKNCAMGAMING.PlayerScripts.SprintHandler:16: Incomplete statement: expected assignment or a function call"</p> <p>Here is my script:</p> <pre class='brush: lua'>local uis = game:GetServi...
106402
1
97971
0
82335566
blazar04
281
2020-06-15 00:03:31
<p>I assume you are trying to decrement <code>currentStamina</code>? The <code>until</code> keyword is only used on a <a target="_blank" href="https://developer.roblox.com/en-us/articles/Loops#repeat-until">repeat until loop</a>. Replace line 16 with the following:</p> <pre class='brush: lua'>currentStamina = math.clam...
4
Why the part material not chaged be to plastic?
1658152370
RizkySugihartoYT
36
2021-04-02 10:30:45
<pre class='brush: lua'>script.Parent.Parent.Block.Touched:Connect(function(Part) workspace.PartStorage.Part.Changed = Enum.Material.Concrete end) </pre> <p>ehh, hello ^w^ just make a script and what are me doing after the script has completed ^w^</p> <p>thanks >w^</p>
121926
2
111050
4
1792778813
Xapelize
2326
2021-04-02 10:46:52
<p>There is no need to make Part for a neutral function. Change to <code>function()</code> instead.</p> <p>I think you meant why is the part is plastic? Easy fix. Consider replacing <code>. Changed</code> to <code>. Material</code> instead.</p> <p>Need a script?</p> <pre class='brush: lua'>script.Parent.Parent.Block.To...
0
ServerScriptService.Combat:17: attempt to index nil with 'Humanoid' ?
1561550920
tumtindy
36
2022-10-09 15:19:19
<p>So, i'm making a combo script, and i'm trying to fix this issue i've been having for the last 30 minutes, it seems so simple but yet i cant find anyone else with the same issue. Here is my script:</p> <p>local damage local AttackDebounce local plr = game.Players.LocalPlayer</p> <p>game.ReplicatedStorage.CombatEvent....
131835
1
119069
0
435248791
Andromedual
35
2022-10-09 16:28:48
<p>I think your problem is that in line 8 of the code block, you mistyped 'character' with 'cha racter' Try fixing that to be 'character' like this</p> <pre class="brush: lua">local LoadedAnimation = character.Humanoid:LoadAnimation(animToPlay) </pre> <p>Before you post something check the spelling in your script and o...
0
invalid argument #2 (Vector3 expected, got nil) I'm getting this how to I fix it?
417031766
LiamQ926
7
2022-07-04 12:57:08
<pre class='brush: lua'>local rp = game:GetService("ReplicatedStorage") local Sword = rp:WaitForChild("Sword") local cframes = { ["Right Arm"] = CFrame.new(0,-1,0), ["Right Hand"] = CFrame.new(0,0,0) } Sword.OnServerEvent:Connect(function(Player,isEquipped) local Character = Player.Character local Human...
130632
1
117962
1
559514967
T3_MasterGamer
2189
2022-07-04 13:10:30
<p>In <strong>line 22</strong>, you’re trying to find <em>RightHand</em> in a table called <strong><em>cframes</em></strong>. But “RightHand” does not exist in that table because the Right Hand in the table has a space between. You either change that line to</p> <pre class='brush: lua'>Katana:SetPrimaryPartCFrame(Chara...
0
Attempt to call a nil value error when making baseplate random color?
423087185
mrgamer3002
0
2020-09-13 15:18:08
<p>I am trying to make my Baseplate a random color. I put this script in the Baseplate:</p> <pre class='brush: lua'>local Random = math.random(0, 255) local Baseplate = game.Workspace:WaitForChild(“Baseplate”) Baseplate.Color = Color3.FromRGB(Random, Random, Random) </pre> <p>This outputs the following: Workspace.Basep...
113118
0
Why won't my models be able to be sold?
290652683
kingofpronoobs
0
2018-06-07 00:47:37
<p>I cant publish them for people to get and use in their game. This is a problem mainly because I'm making maps for The CrusheR.</p>
59793
0
invalid argument #2 to 'random' (interval is empty)?
1550659634
Zythicaal
2
2021-06-16 15:31:28
<p>The Code is:</p> <pre class="brush: lua">while true do local players = game.Players:GetChildren() local giant = players[math.random(1, #players)] wait() for i = 1,20 do local player = game.Players:GetChildren() status.Value = "Intermision "..20-i wait(1) end for i = 1,...
124463
1
113452
0
60261990
Benbebop
1049
2021-06-16 17:43:47
<p>Sometimes Roblox error codes are pretty unintuitive, this happens to be one of those cases.</p> <blockquote> <p>invalid argument #2 to 'random' (interval is empty)</p> </blockquote> <p><a target="_blank" href="https://developer.roblox.com/en-us/api-reference/lua-docs/math">math.random</a> spits out this error when t...
0
Is the Changed event still broken?
29772586
broboch479
15
2014-03-03 02:46:06
<p>I realize that people have had issues with the Changed event recently... I have a couple scripts that may have been affected by that as well. Please let me know.</p>
459
0
This only changes the text one time but it should change it twice, can you help me?
824069483
epoke466
17
2021-02-23 23:07:45
<p>This script only changes the text once, even when the value changes it stays the same but the first time when the game starts it does change, can you help me fix this?</p> <p>while true do script.Parent.Text = script.Parent.Parent.Parent.Value.Value end</p>
120579
2
109946
0
1466289632
jerryisgod29
131
2021-02-24 07:28:29
<pre class='brush: lua'>while wait(0.5) do -- with while true do it will change so fast so you cant see first text, now it is waiting 0.5 second script.Parent.Text = script.Parent.Parent.Parent.Value.Value end </pre>
0
How come when I aim my part at the Direction of Mouse.UnitRay it doesnt aim there?
22745426
Teeter11
281
2015-05-11 00:55:00
<p>What I am trying to do is aim the part at Mouse.UnitRay.Direction but it aims randomly into the ground and doesnt aim to my real unitray.Direction why is this?</p> <p>Here is the code i used :</p>
17438
2
20844
2
806698
duckwit
1404
2015-05-11 09:46:42
<p>When you use the constructor <code>CFrame.new(Vec3 from, Vec3 to)</code>, you need to be supplying the start position and <em>the position to point towards</em>, not the direction.</p> <p>Additionally, it would be more time-efficient to store a reference to <code>Player.Character.Head</code> and <code>Payer.Characte...
1
Why isn't my wall phase through?
1707889427
connafonna
5
2023-01-14 18:02:42
<p>Hi, I want to check if a player owns a gamepass, then make a wall phase-through. In testing the game, I don't phase-through the wall. My code is a local script, and the child of the model wall. My code is:</p> <pre class='brush: lua'>game.Players.PlayerAdded:Connect(function(plr) local ownsgamepass = game:GetSer...
132834
0
Touch:Connect(function(hit) only works once?
443615303
Filip100012
43
2020-04-26 16:16:29
<p>So I was making a Simulator (you may already know on my first question) I wanted to add a touch event to a MeshPart to open up the Frame. It works but only once for some reason.</p> <p>The shop script:</p> <pre class='brush: lua'>script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid"...
100825
2
93089
0
206535752
AntiWorldliness
863
2020-04-26 16:28:01
<p>Try putting them both in <code>LocalScripts</code>. GUIs should usually be accessed by clients.</p> <p>Shop Script</p> <pre class='brush: lua'>script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then game.Players.LocalPlayer.PlayerGui.Shop.Frame.Visible = true ...
1
How to get rid of the WelderPart Virus?
923777117
Bubble_GumRoblox
16
2021-10-08 14:36:55
<p>so basically I've noticed that every time I make a place scripts called WelderPart keep showing up even when I don't use any free models</p> <p>this is what is inside the script</p> <pre class='brush: lua'>require(6353063872) </pre> <p>does anyone know what they are and how to get rid of them</p>
127816
1
115855
0
110029109
lua_exception
141
2021-10-08 15:39:14
<p>Hiya, welcome to Scripting Helpers! From what I see, it looks to be a malicious file that has been since taken down. I recommend you remove the line of script unless you know what you're doing!</p> <p>While you're still there, I recommend you search your game for other malicious scripts like using this good <a targe...
0
After passing the parameter from local to a server script, it becomes nil. Can you help me out?
1658458271
Padugz
40
2020-07-07 15:30:17
<p>Hello everyone! So I am making a game similar to Survival 303 (dang, nostalgia feels). I have my forage tool, which forages an item that has a: <em>ClickDetector</em> and <em>forageable value</em> (boolean value). So when all criteria are met, the forage tool will then pass the parameter 'Target' (which is the name ...
108436
0
Why the proxymity prompt wont open the gui?
1827123899
wwedffy
2
2022-06-23 06:46:18
<pre class='brush: lua'>local proximityprompt = game.Workspace.Block.ProximityPrompt proximityprompt.Triggered:Connect(function() script.Parent.Visible = true end) </pre> <p>it does not open the gui</p>
130476
1
117816
0
167367445
AidanTES
36
2022-06-23 07:05:22
<p>Hey, if I helped, be sure to approve this answer!~</p> <p>Try using</p> <pre class='brush: lua'>game.Players.LocalPlayer.PlayerGui:WaitForChild("GuiName") </pre> <p>"WaitForChild" might fix your issue. Needs to be a local script for this to work, which it already should be.</p>
0
Why are Simulation features broken ?
321871307
L4V01S13R
0
2017-07-24 12:06:12
<p>Hi, I'm currently struggling to develop because my Studio is kind of broken, whenever I try any mode of simulation (Play / Play here / Run), the CoreGui seems to be broken and my character won't respond to my keyboard inputs ( doesn't move), here's what output is displaying</p> <p><code>13:43:13.769 - TopbarConstant...
45698
0
Tool in StarterGear but when a player respawns it's doesn't go to Backpack?
100172682
SonGohan6
4
2021-02-22 23:18:09
<p>So, thank you for taking your time out of your day to click on this to help me.</p> <p>As the title states, I have a script that clones a certain tool into StarterGear and BackPack but once the player respawns, the tool isn't in the backpack even though it's in StarterGear.</p> <p>I'd really appreciate some help!</p...
120541
1
Attempt to Destroy Welds Failed?
300989791
Omzure
93
2020-11-23 17:29:52
<p>a splitter script where when touched will destroy any welds in the part that touched it</p> <pre class='brush: lua'>return function() script.Parent.Touched:Connect(function(t) if t.Name == "Pushbox" and t.Parent.Name or t.Parent.Parent.Name == "DualityPushboxSpawnButton" then --seeing if the part touched...
116213
0
How would I make a model rotate while anchored?
19138274
NinjaNickO
0
2017-04-23 15:30:32
<p>This might not be much of a scripting question but maybe somewhere in this ill need a script. Im making this laser model which I finished the building but I need to add some effects so its more atmospheric. The part model trying to make rotate is the model in the middle called Barrel. I have one idea of doing this b...
42287
0
How do I make it so when something will teleport, it will be near your torso?
31458887
johnjohncar
10
2014-02-22 00:57:43
<p>Sorry for the long title. I am working on something that when you click a GUI, it will teleport a kart near your torso, no matter where you are. I got all the code down, but theres just one thing that will not work that I do not understand. After I click it, I go to the output, and one thing says Unable to cast Coor...
216
1
NPC runs away from players, but doesn't changes directions when a player is close to it (?)
1961959172
imnotaguest1121
362
2023-03-09 14:54:47
<p>Hello Developers!</p> <p>I've made a simple AI which will run away from players using Pathfinding, the issue however that it does <em>indeed</em> work just it doesn't change directions when encountering different players for example, I'm chasing the AI and the AI is almost infront of another player but the AI doesn'...
133166
0
Sound ingame and Solo
29806839
ConnorVIII
448
2014-03-13 17:32:57
<p>This is not a question where I ask somebody to correct a noob piece of Lua. I wanted to ask, to see if anyone can explain why some scripts for sounds only play in Solo. I dont understand why the script doesnt work ingame when 3-5 minutes before in Solo, It worked perfectly fine. Does the music actually play but I ju...
666
2
1065
1
25622294
Muoshuu
580
2014-03-13 18:39:10
<p>Put the Sound in the Player's StarterGui :)</p>
0
Script wont function properly?
18369403
Lem0nzz
5
2014-04-16 11:55:15
<p>This script wont work, I changed the path, but it wont work still. Help!?</p> <pre class='brush: lua'>local player = Game.Players.LocalPlayer local swordMesh = script.Parent local GuiBar = player.PlayerGui.StarterGui.Frame.TextBox --Change to correct path. GuiBar.FocusLost:connect(function() --When someone is finish...
2128
0
How do I use SurfaceGui and GetUserThumbnailAsync?
776038478
Tilley_Eyelash
0
2020-10-17 15:48:10
<p>Hi all. I have been trying for hours... to create a part in game, where when a player enters the game they will see a picture of themselves on the wall.</p> <p>I have tried lots of scripts, including the one on the developers site, but it is still not working.</p> <p>I have it in a localscript, in an Imagelabel, in ...
114480
0
attempt to perform arithmetic (add) on Instance and Vector3?
1533102773
SYKEYE3T
9
2022-03-10 08:05:19
<p>I have this script in a part and whenever you touch it you're supposed to have a blurry vision and some spinning ducks spawn on your head like in cartoons when they're dizzy. Now that I've cloned it I change it's parent to the hit.Parent.head which is the player's head and I wanted to make it higher but this error p...
129250
1
116921
0
1122312651
totosimamora608
61
2022-03-10 08:13:22
<p>hit.Parent.Head is a Instance, and you want to add it with Vector3.</p> <p>I think you meant:</p> <pre class='brush: lua'>dizzyDucks.Parent = hit.Parent.Head -- or dizzyDucks.Parent = hit.Parent.Head dizzyDucks.Position = dizzyDucks.Position + Vector3.new(0,1,0) </pre>
0
Hello scripters! I have a questions eith Filtering Enabled, what does it do?
94203834
AswormeDorijan111
531
2018-07-08 09:30:48
<p>Hello! I have a question with Filtering Enabled! Can you guys explain what does it do. Ill accept the best answer, but then again, I wanna learn something.</p>
62153
1
60597
3
338950628
RedcommanderV2
1256
2018-07-08 10:04:46
<p>Filtering enabled basicly stops communication between the client and the server.</p> <p><em>Some examples</em> - You cannot access the contents of the playergui using scripts</p> <ul> <li><p>You cannot change a value inside a server area using a local script</p></li> <li><p>Changing things on the client but on the s...
0
How do you detect a specific keyframe from a script in roblox studio?
1483026272
wswswff
14
2022-11-17 14:18:24
<pre class='brush: lua'>humanim.KeyframeReached:Connect(function(keyframename) print(keyframename) if keyframename == "HandsOut" then local gras = script.Parent.Parent.Spawn_Grass local gra = gras:Clone() gra.Parent = workspace gra.Transparency = 0 gra.Anchored = false ...
132300
0
[Solved] TextLabel Text getting cut off?
54698583
wolffdonnaven
12
2020-09-13 23:12:26
<p>I have a GUI showing text of a person talking, and some of the words get cut out (trailing off the screen) for no apparent reason. I checked my code about 3000 times and I am yet to find any error.</p> <p>Code:</p> <pre class='brush: lua'>local dialogueGui = game.StarterGui.dialogueGui local textLabel = script.Paren...
113138
0
Is there a way to make it so that Humanoids don't die at 0 health?
40692641
IDKBlox
349
2019-06-19 01:56:26
<p>Is there a function to do this? or something?</p>
82047
3
76324
1
15912341
PhantomVisual
992
2019-06-19 18:41:36
<h1><a target="_blank" href="https://developer.roblox.com/api-reference/function/Humanoid/SetStateEnabled">Humanoid:SetStateEnabled()</a></h1> <p>Set the "Dead" state to false like this:</p> <pre class="brush: lua">Humanoid:SetStateEnabled(Enum.HumanoidStateType.Dead, false) </pre> <p>This will disable the character dy...
0
How do I correctly use Delta Time?
137505940
GameBoyOtaku
63
2021-02-23 00:16:59
<p>I'm working on an FPS game and one of the big problems is uncapped FPS for I use RenderStepped for pretty much everything in the Framework as well as other things. I realize this is bad practice for those such as myself wanting to play the game in a higher FPS but after reading a lot and a lot about Delta Time I jus...
120544
0
How do you make music play in a ScreenGui?
677022540
LinkZelda_Sage
16
2020-04-14 00:54:20
<p>how do you make music play in a screengui? for example, i'm making a game and i have a title screen with labels and buttons, right? and then, i want to add music that lasts until you select the button to play the game! which has it's script that works already</p> <p>PLAYGAME.MouseButton1Click:Connect(function() Fram...
99181
2
91648
1
34068239
NiniBlackJackQc
1492
2020-04-14 01:09:54
<pre class='brush: lua'>--services-- local Players = game:GetService('Players') -- This is the folder that you can see on the explorer. --variables-- local Player = Players.LocalPlayer -- This is you, but you can do it just in a LocalScript. local PlayerGui = Player:WaitForChild('PlayerGui') local ScreenGui = PlayerGui...
0
How can i make like a value jump thing?
178444541
tutuninjago
4
2021-04-06 14:38:51
<p>So i wnat a dubble jump and a value and how much that value is that's how many dubble jumps i have</p>
122075
0
GUI Visible to different players in the Game?
417593033
manipulativefixation
0
2020-06-30 01:51:56
<p>Hello Developers,</p> <p>I'm Creating a game and want to make a "Roll The Dice GUI" Visible to only a specific client. I have absolutely no idea how to do that. If you guys could help me out that would be great.</p> <p>Thanks In advanced.</p> <p>-Carter</p>
107809
0
How to change Orientation with a Script?
78716656
Dalamix
26
2019-06-06 08:38:48
<pre class='brush: lua'>script.Parent.Changed:Connect(function() if script.Parent.SteerFloat == 1 then script.Parent.Parent.FL.Orientation = Vector3.new(0,-45,0) script.Parent.Parent.FR.Orientation = Vector3.new(0,-45,0) elseif script.Parent.SteerFloat == -1 then script.Parent.Parent.FR....
81273
0
bad argument #2 (number expected, got Object) error when trying to remove a player from a table?
48062613
Master_Aaron
59
2020-04-03 03:28:41
<p>Hi, I'm trying to make a block of code where when the player touches a brick it removes them from the "PlayersToKill" table. But when I run the code I get this error. bad argument #2 (number expected, got Object) on line 21. I'm not sure what this means or how to fix it but if somebody could help me that would be gr...
97946
0
[Solved] Attempt to index nil with 'Frame'?
154366253
gameradam2007
1
2021-04-24 02:15:42
<p>So I tried making a script where when you interact with an npc a gui appears but it keeps showing me this error in the Output.</p> <p>Here's the script :</p> <pre class='brush: lua'>1 local TemplatesPart = script.Parent 2 local Temp = game.Workspace.Templates 3 4 TemplatesPart.ProximityPrompt.Triggered:Connect(fu...
122732
3
Getting DataStore data without using OrderedDataStore
23472453
TheGuyWithAShortName
673
2014-02-18 00:36:12
<p>How am I able to print all of that data inside of my datastore database without knowing the keys?</p> <p>Every example I've seen uses OrderedDataStore, which isn't released yet.</p>
52
1
111
1
13416513
Merely
2122
2014-02-18 00:51:14
<p>Currently there is no way to get all of the keys within a datastore.</p> <p>However, you can manage a list yourself by having a main key that consists of a table of all other keys. Whenever you create a new key, call UpdateAsync on the main key and add that new key to the table.</p>
1
Screen Gui pop up for new players ONLY How to??
433962773
theking66hayday
148
2022-09-17 15:50:38
<p>Hi, i'm trying to make a screen Gui popup only for new players. I want it to be activated when They click the play button and if they are a new player it will come up.</p>
131651
1
118910
1
94006350
BulletproofVast
901
2022-09-18 15:41:42
<p>It would require some sort of a datastore system. Make the default data with a value like JoinedBefore = false.</p> <p>once they click the button, you could do something like</p> <pre class='brush: lua'>function clickedbutton() if RemoteFunction:InvokeServer() == "First_Time" then frame.visible = true end end </pre>...
0
How do i perform an animation with a tool?
305663248
Anto3oo
9
2019-03-05 20:15:04
<p>so yeah im back! with another question , sorry to bother you guys , okay well i want this tool to perform an animation when clicked but it doesnt work , i know that the click when tool equipped works because i got a playsound there , but i dont know what to do so the animation plays</p> <pre class='brush: lua'>local...
77251
1
72467
0
849198397
jdm4llfem8
94
2019-03-05 20:22:39
<p>i dont think this is correct, but thats how i do it</p> <pre class='brush: lua'>script.Parent.Activated:Connect(function() script.Parent.BRMM:Play() local animation = script.Parent.Parent.Humanoid:LoadAnimation(script.Attack) -- you didnt set "tool" to a correct variable, oof animation:Play() end) script.Parent.Une...
0
How do i mark coins and kill on leadersttats? Read body please
1162384224
Prekzz
0
2022-05-15 18:32:30
<p>I want to give the player 10 coins per kill, and add it to the coins leaderboard, as leaderstats. Also, I want to know how many kills the player has, and how to input that information inside the leaderstats.</p>
130009
0
Server Side Script with Datastore not running at all? [SOLVED BY DISCORD SERVER]
354170557
dosechickens
2
2020-09-14 03:23:17
<p>i am trying to use a data store but its not running not even a warning or error. i am new to lua and roblox stuff so please be easy on me.</p> <pre class='brush: lua'>function OnPlayerJoin() local DataStoreService = game:GetService("DataStoreService") local WoodStore = DataStoreService:GetDataStore("PlayerWo...
113149
1
It wont remove player from table? [SOLVED]
226832508
MattVSNNL
614
2021-03-06 12:23:29
<p>So I'm making an elevator game and I made a lobby so players choose to go into the elevator and not get teleported so I made a table to access all the players detect if they are in the elevator but I wanted to make when they die they get removed from the table so they won't get teleported but my code won't work, can...
121009
0
Rotate shark like sharkbite 2?
435817619
SpriteGamerHD
47
2022-11-24 21:35:27
<p>I cant figure out how to make the shark move up when i move my mouse up and move down when i move my mouse down and im holding right click</p> <pre class='brush: lua'>local mouse = game.Players.LocalPlayer:GetMouse() while wait(0.1) do workspace.Chassis.Main.Rotation = Vector3.new(workspace.Chassis.Main.Rotation...
132369
0
Is there a way to make items stack in the backpack?
972007460
GooseStranger
32
2020-08-01 13:36:08
<p>I am making a farming game and I am finding it tedious to click through the back pack to plant the seeds and I was wondering if there was any way to make them stack easily, any help would be nice!</p>
110465
0
plr.CharacterAdded:wait() not working in StarterPlayerScripts?
7387030
LostPast
253
2016-04-19 22:24:04
<p>If you place this local script in StarterPlayerScripts <code>plr.CharacterAdded:wait()</code> does not work.</p> <pre class="brush: lua">local plr = game.Players.LocalPlayer print("fire check 1") local char = plr.CharacterAdded:wait() print("fire check 2") local torso = plr.Character:WaitForChild("Torso") print("fir...
29755