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
separating words in strings?
41100413
BSIncorporated
640
2015-04-28 14:58:46
<p>I was wondering how I could separate words that are chatted, so that if I chat "give me all the money" and have it print results I would get -give -me -all -the -money</p> <p>[EDIT] I figured ^^^ that out. but now I need to know how to access specific words.</p> <pre class="brush: lua">game.Players.PlayerAdded:conne...
17087
0
How do I add knockback to this enemy NPCs damage script? [SOLVED]
117399692
SamuelaNutella
14
2020-04-13 19:15:13
<p>Hi. I'd like to add knockback to this NPCs damage script. Unfortunately, I'm not that experienced with Roblox Studio. Could someone please give me an example of how this can be done? Thanks!</p> <p>Here's the NPCs <code>script</code>:</p> <pre class="brush: lua">local hum = script.Parent.Parent.Humanoid local bandit...
99137
2
91687
0
550705045
LioshaPlay
66
2020-04-14 15:19:51
<p>More or less like this</p> <pre class="brush: lua">--By Zgoly -- --Variables-- local Npc = script.Parent.Torso --Code-- local function PlayerTouched(Part) local Player = Part.Parent if game.Players:GetPlayerFromCharacter(Player) then Player.Humanoid.Health = Player.Humanoid.Health -5 ...
4
How can i save models with DataStore?
849198397
jdm4llfem8
94
2018-12-28 15:49:22
<p>So i am trying to make a saving system for models, but i dont know how. So how do i save models that have extra parts that were put from an remoteevent?</p> <p>for ex. a player puts a random decal in an random part (every part is called part). and a player puts a new part to an model. how do isave that decal/part an...
73181
0
How to put an avatar thumbnail on an GUI when a UserID is typed?
1006178880
LEGOBOUWENS123
0
2021-06-09 13:32:14
<p>Hey there, I'm currently making a system so when the player types a UserID it displays the thumbnail of that user's character but I'm getting the error <strong>"Argument 1 missing or nil"</strong></p> <p>This is the code that I'm using:</p> <pre class='brush: lua'>local text = script.Parent.Text local Players = game...
124220
0
How do you make this tool loop it's animation while your left click button is being held?
252786666
comfycouchman
0
2019-12-27 19:05:00
<p>I was animating and scripting a tool for it to be a click-and-hold tool, which means it should loop the animation when you click and hold your left mouse button, but it should immediately stop once you release it. I got the animations done and everything, but I need the "looping" part. How do you do that?</p> <p>Oh,...
92025
0
[SOLVED] Function Doesnt Change Parts Materials or Toggle Lighting?
1680108820
JmoneyPlayzOfficial
49
2023-02-23 06:59:40
<p>i found out what the problem was, instead of doing it for all the children, it picks a random one and does the script for that one only while all the others just stay on, if anyone can help that would be awesome</p> <blockquote> <p>Script</p> </blockquote> <pre class='brush: lua'>local function light(materialone, ma...
133109
0
How do I make a dialog that Teleports you to another brick?
34310670
EpicLilC
150
2014-04-16 10:46:36
<p>So my game is an adventure and you are the main character so you go to the store across the street and theres this guy who poisons you and when he evil laughs how do I make you teleport to another brick or spot in the game?</p>
2120
1
2814
0
806698
duckwit
1399
2014-04-16 11:17:33
<p>You can teleport a player by adjusting the <code>CFrame</code> (<em>Coordinate Frame</em>) of their Player's <code>Torso</code>.</p> <p>Lets say you have a brick in a LocalScript called <code>brick</code>that you want to move the player to:</p> <pre class='brush: lua'>brick = workspace.Destination player = game.Play...
2
Why won't this script that i put in a health GUI sense that the health is lower than 99.9?
6476813
omrikoko
22
2014-12-24 05:22:42
<pre class='brush: lua'>local model = game.ServerStorage.Health:Clone() local PlayerHealth = script.Parent.Parent.Parent.Parent.Character.Humanoid.Health if PlayerHealth &lt;= 99.9 then wait() print("Rawr") wait(5) model.Parent = script.Parent.Parent.Parent.Parent.Character end </pre>
13577
0
How to detect when randomly picked &quot;killer&quot; either dies or leaves game?
938349923
Carlowskey
20
2021-06-28 06:13:01
<p>I am trying to make my loop break whenever the random chosen "killer" either dies or leaves game. I have been trying to figure it out for the last 4 hours and i'm in desperate need for help. Here is the script:</p> <p>``local go = true</p> <p>game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(...
124825
0
Is it possible to display player's usernames on a surface gui if they are touching a specific block?
119219022
JustBenHD
2
2021-05-01 15:48:37
<p>So basically if they are touching a part called 'detector' their username will be shown on a surface UI. If there's multiple it would display it as USER1, USER2</p> <p>Is this possible and how would you do it?</p>
122995
1
112072
0
55174990
sO_Ov
275
2021-05-01 16:07:08
<p>Here's a example (i'd recomend use Region3 instead Touch Events)</p> <p>There's model link if you had some issue <a target="_blank" href="https://www.roblox.com/library/6752717521/DisplayPad">MODEL</a></p> <pre class='brush: lua'><br />--Important: Your detection part must be more high than players avatar local Play...
0
why does my character turn grey after i die once?
377591837
OctavianH0310
0
2021-02-22 21:08:38
<p>my character goes grey after i die and i dont know how to solve it. can somebody help me ?</p>
120530
0
How to fix &quot;Unable to cast to Array&quot; error?
185319105
Hydrogyn
155
2020-03-21 18:03:51
<p>Hello,</p> <p>The code is in a LocalScript located in the StarterGui and whenever I click play the output fills with "Unable to cast to Array". I don't understand it what it means but if you do that would help a lot!</p> <p><code>12:57:32.436 - Unable to cast to Array</code></p> <pre class='brush: lua'>local content...
96638
1
89272
0
33788911
killerbrenden
1537
2020-03-21 18:15:35
<p>Hmmm... Not sure, I've used this before and it worked perfectly fine.</p> <p>Here's another way of doing it, it's just more complicated. Not really sure why it's throwing this error.</p> <pre class='brush: lua'>local ContentProvider = game:GetService("ContentProvider") local assets = { game:GetService("Workspace...
0
Why team shown in GUI is not my team?
59204946
PathDevel
0
2014-04-16 12:41:31
<p>Hello.</p> <p>I'm new to Roblox, so excuse me if this question is stupid, but I didn't find anything in wiki.</p> <p>I've created 2 teams "Mafias" and "Policemen". For now, I assign all players to mafias team. But in-game, every player gets Policemen team, I don't know why.</p> <p>My code:</p> <pre class='brush: lua...
2136
0
How do you find the mouse's vector3 value?
483661890
TheStarRblx
27
2021-04-08 16:33:00
<p>Hi, I'm trying to set a parts position to the mouse's position. I've tried using mouse.Target, mouse.Hit and mouse.X / mouse.Y.</p> <p>Current code:</p> <pre class='brush: lua'>local player = game.Players.LocalPlayer local mouse = player:GetMouse() local SpellPart = game.Workspace.Spell local function SpellSummon() ...
122151
1
111277
1
121672610
Speedmask
111
2021-04-08 17:43:07
<p>hey, you're already on the right track. the reason this isn't working is because you are trying to create a part from the client, or from the player's computer. this is a whole topic all in itself and I suggest you read <a target="_blank" href="https://developer.roblox.com/en-us/articles/Roblox-Client-Server-Model">...
0
How to use 'revive' a dead corountine inside a module script?
15174910
drslicendice
27
2016-03-12 03:45:28
<pre class='brush: lua'>local printThis = coroutine.wrap(function() game.Workspace.BasePlate.BrickColor = BrickColor.new(Color3.new(1,0,0)) wait(1) game.Workspace.BasePlate.BrickColor = BrickColor.new(Color3.new(0,1,0)) end) return printThis </pre> <p>I had a problem whenever someone triggers a module script and dies, ...
28368
0
I can't walk through my union doorway, how do I fix it???
677278792
NickIsANuke
217
2019-08-11 22:01:31
<p>So, I am making a tycoon game, and the wall is shaped like a ring. I used the negate part to make a doorway through the outer ring, but for some reason, I couldn't walk through it when I union it. What is happening? Also, if anyone knows how I can show some pictures, please let me know!</p>
85560
0
Is there a way to prevent characters from breaking upon death?
79916132
SHDrivingMeNuts
299
2016-05-15 10:42:00
<p>I've been wondering for along time and never really found out how to do this.</p> <p>Im not asking for a script, just for a step in the right direction, thank you.</p>
30597
1
How would I loop through a model?
99410104
jorcorrs
76
2019-09-29 18:07:53
<p>Okay, so I was trying to make a script that will make a flood happen and when you die you spawn somewhere else. However, it will not work. Could someone help me?</p>
88121
1
81691
0
310898243
EmilyBendsSpace
1025
2019-09-30 00:48:38
<pre class='brush: lua'>for _,child in pairs(model:GetChildren()) do -- do thing with child end </pre> <p>Will loop over the first-generation children.</p> <pre class='brush: lua'>for _,descendant in pairs(model:GetDescendants()) do -- do thing with descendant end </pre> <p>Will loop over the entire contents of...
0
How To Transform Seconds Into Hours/Minutes/Seconds?
1554573538
kidsteve923
80
2021-05-04 08:58:45
<p>hey Devs I have been Working On A Daily Reward System And I Cant Transform the Seconds Into Hours/ Minutes / Seconds can you guys help me in it. my code is this</p> <pre class='brush: lua'>local Chest = game.Workspace.Chest local Chest2 = game.Workspace.CHEST2 local Lower = Chest2.NameTag.Lowertext local debounce = ...
123080
0
Developer Product won't add 10 health when purchased?
41519344
Fendd
5
2014-04-30 21:50:42
<pre class='brush: lua'><br />a = player.Character.Humanoid.MaxHealth local MarketplaceService = Game:GetService("MarketplaceService") local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory") local productId = 19697165 -- Put id here for it MarketplaceService.ProcessReceipt = function(receiptInfo)...
4010
1
5546
0
60294522
Link43758
175
2014-05-01 00:30:26
<p>Player is not defined when you are setting the variable, therefore the script errors at the very beginning.</p> <pre class='brush: lua'>local MarketplaceService = Game:GetService("MarketplaceService") local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory") local productId = 19697165 -- Put id ...
1
Why is it not removing the value from the table?
111567127
Jay123abc2
241
2022-09-27 19:43:39
<p>I am trying to make a custom inventory system however when a tool gets deleted, the last tool in the toolbar will be deleted. For example, if I have tool 1 being a block, tool 2 a stick and tool 3 a shovel. When tool 1 is deleted, tool 3 will actually be deleted and 1 and 2 will stay, when it should be 2 and 3. I ha...
131736
1
118990
2
1929477313
Kingu_Criminal
205
2022-09-27 20:00:15
<pre class="brush: lua">if v == child.Name then print("Yes") table.remove(tools, i) print(tools) break end </pre> <p><code>v</code> will never equal <code>child.Name</code> because <code>v</code> is an <code>Instance</code> (You are getting the objects from the backpack, and not getting their name) and ...
1
TweenService Easing Direction Problem?
216701907
namespace25
594
2018-12-01 03:47:34
<p>I am creating a gate that should tween down and upon command. It does but it rotates weird and then does not go where I want it to. After it is open whenever it goes up it should be at the same 90° angle - somewhat a 90° angle.- and it should go back to position but it fails to do so.</p> <p><em>Rotation Of Gate:</e...
71407
1
69204
1
825098526
Y_VRN
246
2018-12-30 08:28:09
<p>You're probably missing "* <code>CFrame.Angles()</code>" in your code, which is after both CFrames in both TweenInfos. Try this</p> <pre class='brush: lua'><br />local Gate = workspace:WaitForChild("Gate") local TweenService = game:GetService("TweenService") local Activated = false local Tween1Information = TweenInf...
3
How do I get the children of a :GetChildren()?
5001821
RobloxGuy6403
15
2015-04-30 14:22:23
<p>I'm trying to make a script that would unanchor parts inside a model, which is inside another model. Like this:</p> <ul> <li>Workspace <ul> <li>Model <ul> <li>Script (the script)</li> <li>ELights (first Model) <ul> <li>EmergencyLight (second Model) <ul> <li>Part (the parts i want to unanchor)</li> <li>Part</li> </u...
17136
0
Is there anyway to detect whether a player is online?
847431372
Student20986
0
2021-01-12 00:19:45
<p>Is there any way to detect whether a player is online? I have search a lot trying to find anything about anything. I have found a few things but they don't work, and or don't do what I want.</p> <p>I have found a few things like <a target="_blank" href="http://"> https://api.roblox.com/users/USERID/onlinestatus/</a>...
118568
1
What are the basics of ROBLOX Lua?
29374750
ninjaflamer27458
5
2014-02-21 18:57:19
<p>What are the basics of scripting to help me get started?</p>
201
0
How to fix shift to run script stop when I died?
676326715
WINDOWS10XPRO
432
2021-10-10 11:25:52
<p>I made a shift to run script it works well but when I reset my character, the script stops and is no longer working. Can somebody help me out with this bug?</p> <h1>Here's the script</h1> <pre class='brush: lua'>local Running = false local Oldwalkspeed = humanoid.WalkSpeed UIS.InputBegan:Connect(function(key,gamePro...
127826
0
i get both player is admin and not admin, what?
1722430189
jeremqpmfpi
39
2021-06-11 21:49:30
<p>i am trying to make a script for to check if a person is or is not admin</p> <pre class='brush: lua'>local player = script.Parent.Parent.Parent.Name local players_allowed = {"jeremqpmfpi", "gosubtojerem_qpmfpi"} print(players_allowed) wait(1) for index, player in pairs(players_allowed) do if player == players_al...
124294
0
How can I clamp/limit the camera's Y angle to 40 degress being the maximum smoothly?
76176277
MrDarkLord1234
7
2021-01-12 00:35:39
<p>So I've been trying to limit my camera's Y angle to not allow the player to look down more than 40 degrees. I found a way to do it and I did it using math.clamp(), but it ended up not being as smooth as I hoped it would be.</p> <pre class='brush: lua'>local uis = game:GetService("UserInputService") local runService ...
118570
0
Player doesn't respawn sometimes?
206662594
rookiecookie153
26
2020-10-17 22:58:06
<p>I wasn't able to get any errors, but sometimes when my health reaches 0, the player doesn't actually die! All they do is just stay disassembled and do nothing! Also, when I try changing the properties of the HUMANOID, it doesn't apply unless it's in the console! For example, here is a line of code that should change...
114496
0
Scriptable First Person??
28144472
DevScripting
92
2014-12-09 05:18:42
<p>****First Person Script, there are no problems with my script, but how could I make this more efficient by not having to go through thousands of lines (mouse.X) when you find "Mouse0 = 0" and stuff like that how could I make that a bit better? I want this script to be the best of its ability. Is there a way to make ...
13127
0
How do I make functions global?
18001656
wrenzh
65
2014-04-26 16:03:01
<p>So that I may use them in any script in the place, including LocalScripts and server Scripts.</p> <p>I made a global function using _G in a LocalScript, but when I tried to call it on a server Script, it failed.</p>
3599
2
5449
1
3239402
hievery1
70
2014-04-30 03:44:53
<p>(I would post this in a comment if I had 10+ reputation) I'm fairly sure you cannot specify a global functions (and global variables) in a localscript. Try putting it into a normal one:</p> <pre class='brush: lua'>_G["hellomynameisfunction"]=function() print("WHOA MAN I JUST DID SOMETHING") end _G.hellomynameisfunct...
1
I keep getting (nil value) when trying to rotate a part, how do I fix this?
221940292
timey255
7
2020-03-26 04:10:59
<p>game.Workspace.part.Orientation =</p> <p>I've tried</p> <p>game.Workspace.yeet.Orientation = Orientation.new(x,y,z) didnt work and some others.</p> <p>(I'm starting to script btw)</p>
97101
2
89661
0
171340748
maxpax2009
335
2020-03-26 10:57:29
<p>If you just want to move the part then just utilize <code>Vector-3</code> If you want to use another datatype which is used to alternate the Orientation. Then we use CFrame.</p> <p>Lets start by printing the CFrame</p> <pre class='brush: lua'>local Part = script.Parent print(Part.CFrame) </pre> <p>Now this may look ...
1
How to get a string/name from a table?
1251627904
CodeWon
121
2021-02-23 23:10:17
<p>So I'm making a ban script and I can't figure out how to get names from the table of banned players</p> <p>i tried this it didn't work:</p> <pre class='brush: lua'>if player.Name == table.find(banned) then </pre> <p>(banned is table/list of banned players)</p> <p>How could I do this?</p>
120580
0
Why does roblox studio add in an extra bracket?
384201321
Dexiber
257
2020-07-07 01:31:07
<p>Whenever i open a script in roblox, and i type something like "function()", it adds an extra bracket. Also once i type something like:</p> <pre class='brush: lua'>script.Parent.Touched:Connect(function(hit)) </pre> <p>it adds and extra bracket near the "hit", as seen above.</p> <p>How do i turn this off, am i able t...
108397
5
How to check if the number generated is a multiple of 5?
124281858
DeceptiveCaster
3098
2018-10-31 13:25:09
<pre class='brush: lua'>local number = math.random(20,80) if number == 20 or number == 80 then print("Scouted stat limit reached") end </pre> <p>I wonder if there is a more efficient way to find if the number is 20,25, 30, 35, 40, 45, 50, 55, 60, 65 ,70, 75, or 80. Typing a lot of <strong>if</strong> and <strong>or...
69791
0
How far apart should my seats be horizontally for my bench?
407180563
robloxtitanic584
40
2021-04-07 14:16:09
<p>How far apart should my seats be horizontally for my bench?</p>
122116
2
111258
1
56177123
nikoviking
231
2021-04-07 17:39:32
<p>In my benches, I usually space my seats <strong>3.5 studs</strong> apart. It allows ample room for the character's arms, so they don't intersect with your neighbour's body parts.</p>
0
Why doesnt localscripts work on proximity prompts?
1179331769
Cooldoodle2019
4
2023-01-25 15:19:11
<p>doesnt work, really strange.</p> <pre class='brush: lua'>script.Parent.Triggered:Connect(function() print("Test") end) </pre> <p>nothing outputs the local script is inside of the proximity prompt, i tried using remote events but when i do OnClientEvent (yes i called it through a regular script) nothing happens a...
132941
1
120065
1
118061211
MoralArsonism
47
2023-01-26 14:10:48
<p>It's important to know that <strong><code>LocalScripts</code> cannot run in <code>workspace</code></strong>. Instead, you need to use a regular <code>script</code> and <code>RemoteEvents</code>.</p>
2
What is the hashtag/number sign in roblox Lua?
28392715
Awsomeman511
30
2016-09-07 20:35:57
<p>so I was looking at some sources and found this:</p> <p>for i = 2, #p do</p> <p>does anyone know what the "#" means?</p>
35410
4
37898
6
386992
BlueTaslem
18071
2016-09-07 20:53:49
<p>It's an operator that means "length of".</p> <p>For a string, that's the number of characters (letters, numbers, spaces, punctuation marks) in it:</p> <pre class='brush: lua'>print(#"cat") --&gt; 3 print(#"hello world") --&gt; 11 </pre> <p>For a list, that's the number of things in it:</p> <pre class='brush: lua'>pr...
1
How to spawn a map from lighting then delete it?
17941891
Rurith
10
2014-05-01 02:51:11
<p>Like:</p> <pre class='brush: lua'>game.Lighting.LoadMap:"The Town" </pre> <p>and how do I delete this map later?</p>
4040
0
How to check if a player pressed a key?
1404939345
InterDwarf
14
2021-02-01 06:01:51
<p>So, I wanna check when a player pressed a key to make a sort of "attack."</p> <p>This is the current code which isn't working:</p> <pre class='brush: lua'>game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function(char) local UserInputService = game:GetService("UserInputService") ...
119480
2
109076
0
381646902
Feelings_La
399
2021-02-01 11:23:56
<blockquote> <p>As DetectiveRaie said, you should use :InputBegan() to simply detect user input. Also remember UIS only works in 'LocalScript' not 'ServerScript' <strong>( RECOMMENDED ONE )</strong></p> </blockquote> <p>Basic Code:</p> <pre class='brush: lua'>local UserInputService = game:GetService("UserInputService...
0
Is there a way to have a color sequence as a part's color?
6333934
Marmalados
193
2019-02-08 22:03:41
<p>I'm making a particle effect that when emitted using :Emit(), it would emit the particle, but since i'm lazy, i prefer not to manually assign the color sequence to the parts color. I understand that color sequence has more than 1 values due to the variety of colors you can blend together, but when you only include t...
75895
3
What is Roblox using for the Custom Chat Name Color Algorithm?
2933011
Nickoakz
231
2016-03-09 08:59:29
<p>We all know by now that it's not what they say it is by 'random'..</p> <p>So how are they calculating the color for our name?</p>
28283
0
[Help] How to make a voting system be capped to one vote per player?
94044627
Shadrocks12345
0
2021-09-15 00:02:47
<p>Hi i'm trying to make a voting system to only allow a player to click vote once on a button.</p> <p>Here is what I got so far but when I click the vote button again, it keeps adding another vote, is there any way to make each player able to vote once?</p> <pre class='brush: lua'>script.Parent.MouseButton1Click:Conne...
127448
0
How to check if a key is being held down?
74087102
Ziffixture
6913
2018-12-28 07:27:48
<p>I’m using UserInputService, I know how to check if a key was pressed, but I’m not sure how to tell if it’s being held down, how would I do that? How would I check if It weren’t held anymore too?</p>
73157
0
Assigning players to a specified team?
576570872
Zolikillerxdd
0
2022-05-05 20:38:47
<p>Hello!</p> <p>I just made a very basic clicker game, and added a localscript which can detect a players country when joining the game (exactly this :<a target="_blank" href="http://"> https://developer.roblox.com/en-us/api-reference/function/LocalizationService/GetCountryRegionForPlayerAsync</a> ), i put it in the S...
129920
0
Currently having an issue with a gun animation I'm making, does anybody know how I can fix this?
1314599390
NuggetHasJoined
7
2021-02-08 11:17:49
<p>I'm making a game, and there's a gun in it that doesn't have an animation for recoil. I attempted to add one, but now the gun doesn't work at all. I've added the animation into the gun, named it Recoil and gave it the AnimationId, but it doesn't work at all.</p> <p>Here is the script I'm using:</p> <pre class='brush...
119818
0
need help making a abbreviating system wih DataStore2?
572277495
tommymcoco1
20
2021-05-01 20:49:58
<blockquote> <p>i have had many tries but everytime it fails</p> </blockquote> <p><em>module:</em></p> <pre class='brush: lua'><br />local Settings = { --1 ["Diamonds"] = { --2 ["Where"] = "leaderstats", --3 ["What"] = "IntValue", --4 ["Value"]= 0, --5 }, ["Clicks"] = { ["Whe...
123005
0
StarterCharacter Interfering with Script?
377679694
TheB4dComputer
100
2021-01-12 13:11:06
<p>So, I have a problem where, when a player joins, it checks if they have a certain thing, and if they do, gives it to them, but, if they don't, checks if they have another thing. If they don't have anything, then ends the script. The middle is cut out because it's so big and I know works. Anyway, the script stops wor...
118588
1
108477
1
58729054
Dovydas1118
1495
2021-01-12 13:41:20
<p>Add a CharacterAdded event. You can't do the player.Character variable because it will be nil. The player is added first before the character. Sure the time difference might be slim, but it's a big difference.</p> <pre class="brush: lua">game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(f...
1
Making a Pushback effect?
30125279
yoshiegg6
176
2015-04-30 13:22:32
<p>I've been trying to make a block that pushes players back. I tried bodyforce on the player's torso, but its either too weak to move at all or way too strong, and when the player dies their torso flies away which is messy. How can i just create a brief pushback effect that pushes you a few studs?</p>
17134
2
20532
2
79451355
SurVur
86
2015-04-30 20:14:23
<pre class='brush: lua'>db = true script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Torso") then if db then db = false local torso = hit.Parent.Torso torso.Velocity = (torso.CFrame.lookVector) * -100 wait(2) db = true ...
0
I want to make a race game but how?
1529386135
HosenNuckler_O5
0
2021-04-07 06:54:12
<p>I used the basic map (racing) from Roblox Studios and I'm done, but my friends tell me that some GUIs are not displayed. Could someone please explain the script to me? What I also try is a leaderboard that shows how many wins and money. If you win in the game now, the win value should increase by 1. so before I won,...
122101
0
Roblox avatar importer mesh gets wierd??? (not flipped normals)
1419323251
L30N_C
20
2021-04-08 15:42:38
<p>Ok so i am making a game with skinned meshes as characters. But when i import the mesh with avatar importer the mesh gets really wierd (link to picture down below)</p> <p>https://gyazo.com/775f2883ced810aa17db1d07a7d9bf53</p> <p>i have checked and the normals arent flipped so i don't understand whats the problem. In...
122149
0
How can I make a tool be equipped by holding down a key?
171614003
redrangertyguy
0
2021-05-20 08:42:49
<p>Hello! I was wondering how I could make a tool be equipped by holding down a key and unequipped by letting go of it.</p> <p>I'm assuming to make the holding down part to use UserInputService But I can't think of a way to make the tool equip and unequip by doing this.</p> <p>Thanks!</p>
123615
0
How Do I Get The Local Player From A Server Script?
70241310
BunnyFilms1
218
2017-11-21 17:39:40
<p>So I have had an issue with values not saving to a leaderboard because it was a local script so here I have a server script I made but I get the following error:</p> <blockquote> <p>Script:3: attempt to index local 'user' (a nil value)</p> </blockquote> <p>So the problem is, how do I get the player who clicked the t...
49591
3
49582
1
46052
chess123mate
5433
2017-11-22 07:39:23
<p>This script is supposed to be a LocalScript (read <a target="_blank" href="https://scriptinghelpers.org/guides/server-client-relationship-in-roblox">this guide</a>; servers cannot handle user input directly when playing online). You have up to 2 other problems:</p> <ol> <li>The client (ie any LocalScript) isn't supp...
0
How do i make an /e emote that loops?
47433772
tails2049
0
2019-04-12 21:30:17
<p>I just want to make a simple sit emote, i have the animation pose set up but everything i try either doesn't work or won't loop it. i just need a simple thing that does loop. Does anyone know any videos or stuff on how to do this?</p>
78893
0
SOLVED! Ban command not working. Using a DataStore editor plugin works but command doesn't?
237126800
TheWaildug
40
2020-05-14 16:32:06
<p>I remade the kick script on https://developer.roblox.com/en-us/api-reference/function/Player/Kick into a ban script. I used DataStores to store the banned player. When I use a DataStore Editor, I can add the person. But when I use the command, it doesn't work. Here is my script:</p> <pre class='brush: lua'> ...
103089
1
how do I detect how fast a player changes direction?
109746251
Scrufflord
12
2020-09-14 23:52:57
<p>I want to make the player model tilt towards the direction the player is moving (the quicker it changes direction, the more the player model tilts) and I don't really know how to do either (detect change in direction and tilt player model) could anyone help? Cheers!</p>
113169
1
103899
0
118343046
Elyzzia
1023
2020-09-15 00:28:35
<p>you can simply use the Y component of the HumanoidRootPart's RotVelocity to find the speed the player is rotating at, then base the amount of tilt on that number</p> <p>to actually apply the tilt, you can change the Transform of the character's root joint</p> <p>where that joint is located and what it's called depen...
0
Why is event parameter stacking?
813757086
Pdpieee
1
2022-05-06 06:40:56
<p>this is a button that sends the parameter (there's like 10 of it with different parameter):</p> <pre class='brush: lua'>btn.MouseButton1Click:Connect(function() if db == false then db = true confirm.Visible = true wait() tween1:Play() tween2:Play() event:FireServer...
129926
0
Why doesn't While true do loop forever?
374303498
fellix_yt
5
2021-03-28 13:47:13
<p>That's my script</p> <pre class='brush: lua'>local TimeValue = script.Parent.Parent.Values.Time local PlayersValue = script.Parent.Parent.Values.Players local BoatValue = script.Parent.Parent.Values.BoatReady while true do print("script starts working again!") repeat wait(1) until BoatValue.Value...
121760
0
Making first person camera level with your head (while seeing your body)?
1383341245
SprinkledFruit101
135
2022-09-19 23:13:44
<p>I want to achieve a smooth first person camera system in which the camera is level with your head and you can see your body. Currently, I use the The Smooth First Person Camera [Bundle] by DuruTeru.</p> <p>However, in this script there’s a CameraOffset of 0.7 above the head to make the body look reasonable when you’...
131677
0
Why is this group rank only tool script not working? - Thanks :)
254090301
lukepillingrblx
2
2022-04-05 17:36:15
<p>Like the title says, the script is meant to give them certain tools on the game but for some reason it isn't working. Any help is appreciated thanks.</p> <pre class='brush: lua'>local Folder = game.ServerStorage.ToolStorage local Debit = Folder["Debit Card "] local Access = Folder["Access Card"] local Fire = Folder[...
129561
0
How to create buttons from scripts and set their values?
1359332019
zergvantex
2
2020-05-31 16:44:47
<p>Hello Friends. Thank you in advance for your support.</p> <p>I am planning to create a "trivial pursuit"-like game on Roblox. I have noticed that from from any script I can create a "part" using the "instance.new" call.</p> <p>The part will create, and I can set the size, position etc in real time, from any script a...
104936
3
96761
1
349696413
switchflake
24
2020-05-31 18:56:51
<p>Is your code in a server script or a LocalScript if its in a LocalScript, then your problem may be that you're parenting a textbutton to the starter gui when you need to be parenting it to the player gui ex:</p> <pre class='brush: lua'>local player = game.Players.LocalPlayer local sgui = player.PlayerGui:FindFirstCh...
0
The current identity (2) cannot Source (lacking permission 1) script.Source? [SOLVED]
1122312651
totosimamora608
53
2022-03-15 09:59:18
<p>I want to make make a virus detector on my game and i used script.Source but it give me this error.</p> <p>Did i use script.Source the wrong way?</p> <p>LocalScript:</p> <pre class='brush: lua'>local requires = 0 for _,t:Script in pairs(game.Workspace:GetDescendants()) do if t:IsA("Script") then if not strin...
129319
0
I'm trying to make a Stand from JJBA, and I got an error that I don't know how to fix. Help?
32975136
YoureTotallyScrewed
9
2020-03-04 22:06:59
<p>So I'm trying to make a Stand from JoJo's Bizarre Adventure, right? I was trying to make the positions when it printed an error in the output menu. I tried to fix it by selecting other parts, if that's even the correct way to fix it. I'm kind of new to scripting, so I still need to watch some tutorials. Here's my co...
95561
0
Help on restarting events &amp; functions: How can I restart a function without it firing?
244940412
DUCKONAROLL
0
2021-09-14 05:18:03
<pre class='brush: lua'>clickDetector.MouseClick:Connect(function() print("Started") wait(10) print("Stopped") end) </pre> <p>(That code is sample code, what I am really using it for is so a player gets healed once every second, 10 seconds after an event happens.)</p> <p>How can I restart this function? In ...
127432
0
Stop camera from moving when holding onto a ledge?
529028016
TheD4rkPow3r_WFE
13
2023-03-14 14:58:41
<p>So while working on my game i came upon two problems that i don't find a way to fix. The first problem is that when the player is holding onto an edge i want him to be able to move his head in each direction a bit ( not to be able to do a 360 ) and not his entire body like roblox def settings do. The second problem ...
133188
0
Detect if a player is inside of a radius ?
371637657
ssgmalachi
52
2021-05-03 19:44:34
<p>I am trying to make a certain lock on script, where if a humanoid root part is located within a certain distance of the player, on key press, you lock on to his torso, root, etc. I dont understand how this would be accomplished, if you would help, it would be much appreciated!</p>
123062
0
How do I set the camera back to the player?
469500873
poppyloverb
20
2021-05-02 10:24:34
<p>Here is the script so far:</p> <pre class="brush: lua">local cameraFolder = workspace.CameraGroup local cameraPart = workspace.CameraPart local Camera = workspace.CurrentCamera local frame = script.Parent.Buttons Camera.CameraType = Enum.CameraType.Scriptable Camera.CFrame = cameraPart.Position if frame.Play.Clicked...
123026
1
112099
0
1554573538
kidsteve923
139
2021-05-02 10:31:01
<p>Ok This Is Actually Preety Simple To Do Ok Here Is How To Do It</p> <pre class="brush: lua">local cameraFolder = workspace.CameraGroup local cameraPart = workspace.CameraPart local Camera = workspace.CurrentCamera local frame = script.Parent.Buttons Camera.CameraType = Enum.CameraType.Scriptable Camera.CFrame = came...
1
What is a RemoteEvent?
2604812
Owenrules12
10
2014-11-21 17:15:24
<p>I want to know what a RemoteEvent is.</p>
12631
1
15698
4
64408300
RaverKiller
668
2014-11-21 17:16:22
<p>A RemoteEvent is an object used for client-server (server-client) communication. You can use it to send variables from a LocalScript to a normal Script.</p>
1
what does math.clamp do? Is it important to know about? I want a simple and to-the point answer
1563294759
CaIcuIati0n
246
2020-07-24 16:35:49
<h1>you read the title ;)</h1>
109853
2
100972
1
61269847
RAFA1608
543
2020-07-24 16:40:53
<p><a target="_blank" href="https://developer.roblox.com/en-us/api-reference/lua-docs/math">https://developer.roblox.com/en-us/api-reference/lua-docs/math</a>.</p> <pre class="brush: lua">--According with what i tested, all it does is this: print(math.clamp(1,4,10)) --If the number 1 is lower than 4, it will return 4. ...
0
Hat accessory attachment help?
282150434
Cyrus_O4
0
2021-02-22 01:05:58
<p><a target="_blank" href="https://ibb.co/PMRNGqR"></a> I made a halo and unioned it then made the halo into an accessory. I added an attachment to it but when I put it inside the dummy, the halo rotates to the other side. How am I supposed to fix this?? I have the link to the image if you want it.</p>
120489
0
Question about &quot;or&quot; operator?
123585026
NykoVania
231
2022-11-09 01:16:38
<p>If I make the first argument nil, will the function use it or will it use Torso?</p> <pre class="brush: lua">local function RandomFunction(Pos,FollowPart) local RandomVariable = Pos or FollowPart end RandomFunction(nil,"Torso") </pre>
132201
1
119403
0
1014156252
Puppynniko
1059
2022-11-09 01:27:57
<p>It will use the string</p>
0
How do I make a seat that when you sit in it, it gives you money?
647598508
proudCdthekitten
18
2020-09-06 17:41:01
<p>I literally have no clue how to do this</p> <pre class='brush: lua'>local Cash = game.Players.LocalPlayer.leaderstats.Cash if script.Parent.Humanoid.Sit == true then Cash.Value = Cash.Value + 1 </pre> <p>I tried doing that but it doesnt work. Can someone help me?</p>
112799
4
103534
0
468944525
CreationNation1
368
2020-09-06 17:50:52
<p>For this to work, the script must detect a change in the <code>sit</code> property. You can do so by doing this:</p> <pre class='brush: lua'>local Cash = game.Players.LocalPlayer.leaderstats.Cash script.Parent.Humanoid:GetPropertyChangedSignal("Sit"):Connect(function() if script.Parent.Humanoid.Sit == true then ...
1
Finding a players name to edit the properties inside of it?
96415834
Caigepayne
5
2018-04-20 17:09:59
<p>I am busy making a roblox game and wanted to make a game that will remove a item from the players inventory and add some cash for it.....</p> <p>My game is SO FAR robbing a bank but there is a part in which you can collect credit cards and put it into a ATM for cash....So basically I want for someone to pick up a ca...
57127
0
Script doesnt run after character change?
1775753594
Not_prototype
28
2022-04-30 21:29:37
<p>after you press f and change character the melee attack wont work like it just doesnt run when i press E</p> <pre class='brush: lua'>local plr = game.Players.LocalPlayer local UIS = game:GetService("UserInputService") local MeleeDb = false local shifted = false --//Shift local keybind = Enum.KeyCode.F UIS.InputBegan...
129869
0
How can i attach a rope to a player by clicking?
444971047
Sha4owz
0
2023-01-15 11:38:35
<p>How can i make a tool where when i click, I'm able to attach a rope to the other player? Lets say the player is ragdolled, I click them and a rope attaches, when I click again the rope disappears.</p> <p>simple i think but i need help</p>
132842
0
Can someone help me get a better understanding about RemoteEvents?
226832508
MattVSNNL
620
2020-12-31 22:07:49
<p>Hi I am a Roblox dev and I recently I've been learning some advanced and Beginners scripting So I am still kinda on the RemoteEvents and I don't quite understand em can somebody explain it to me better?</p>
117970
1
107953
0
454425
WizyTheNinja
834
2021-01-01 00:53:29
<p>RemoteEvents are used to send information from the server to the client, or vise versa. RemoteFunctions do the same thing as remote events, except it allows the sender to wait for a response. Both work pretty similar to how a normal Function would work. I'll provide an example</p> <pre class='brush: lua'>--Most peop...
0
I have a problem when i change from R15 to R6 in roblox studio. How can I solve it?
423902024
PepeElToro41
132
2020-04-17 02:06:50
<p>I had already asked this question months before and there were misunderstandings</p> <p>It has been impossible for me for a long time to play in R6 in roblox studio, in the previous question yall asked me for the script but there is no script.</p> <p>Even creating a new game without any script or plugin and switchin...
99561
0
why is Prompt Product Purchase prompting everyone in the server?
50605193
johnnygadget
50
2015-02-04 01:38:07
<p>i'm getting complaints from players being prompted to buy products. players are being prompted when someone else clicks on the buy button. i'm using robloxs sample code.</p> <p>buyButton1.MouseButton1Click:connect(function() game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, pr...
14730
1
[ SOLVED ] Why won't camera go back to normal?
238838551
PadmeOragana
41
2020-06-19 19:56:20
<p>So, in my game, there are a bunch of GUIs that change the camera to face a block. Well, I want it where, when you press the button the camera goes back to normal and it no longer faces the block. The two scripts are in separate buttons, by the way. Code to make it go back to normal:</p> <pre class='brush: lua'>scrip...
106858
0
How to set CFrame of the ViewportFrame camera to the CFrame of the main camera?
325233223
sssynk
58
2019-06-30 14:24:46
<p>Hello all, so today I am trying to match up the ViewportFrame camera with the main camera by setting it's CFrame. I have code attached. The script is the child of the ViewportFrame.</p> <pre class='brush: lua'>wait(3) while 2+2==4 do local viewportFrame = script.Parent local viewportCamera = Instance.new("Camera") v...
82692
1
76891
0
8139872
SignorOmbra
17
2019-06-30 19:27:36
<p>It's actually quite simple! You just need to set the ViewportFrame's CurrentCamera to the current camera in workspace with a LocalScript.</p> <pre class='brush: lua'>script.Parent.CurrentCamera = workspace.CurrentCamera --Set the CurrentCamera of the ViewportFrame as the CurrentCamera in workspace </pre>
0
Why is the '#' in '#contestants' underlined red?
1172126733
aiden66362
0
2021-04-08 00:52:46
<p>I am trying to make a hide and seek game. I am trying to make it so when the seeker leaves the game or gets disconnected, then the round is over and the contestants is 0. But for some reason when I add the hashtag its underlined red. Here is the code:</p> <pre class='brush: lua'>-- Services local replicatedStorage =...
122135
0
How can I make debounce true when you die?
647598508
proudCdthekitten
16
2020-09-15 15:15:03
<pre class='brush: lua'>local debounce = true local function OnTouched(part) if debounce then --script debounce = false wait(10000000000) debounce = true end end script.Parent.Touched:connect(OnTouched) </pre> <p>how can I make the debounce true when you die? I tried to do this:</p> ...
113194
0
Anyone know how to make the dropper give more money when you buy a game pass?
430874503
stickymirro511
37
2020-08-01 14:28:28
<p>I'm trying to make it so that when you buy a game pass the droppers drop more money. Here is the script in the droppers.</p> <pre class='brush: lua'>Cash.Value = 00 </pre> <p>Cash.Value is how much each dropper gives.</p> <pre class='brush: lua'>wait(2) workspace:WaitForChild("PartStorage") while true do wait(2....
110472
2
101466
1
131470756
Pupppy44
471
2020-08-01 14:51:48
<p>You can use UserOwnsGamePassAsync to do this. Here's an example of how it works:</p> <pre class='brush: lua'>function PlayerAdded(p) if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(p.UserId, 1234) then -- This would return a bool value, if I own it it would return true, else false print(p.Name ... " o...
0
TeleportToSpawnByName, but disabling spawning at that spawn?
94316454
WXWWWWWWWWQWWWWWWWWW
2
2019-04-28 17:22:43
<p><strong>local TeleportService = game:GetService("TeleportService") local ID = 1 local spawnName = "abc" function onTouched(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player then TeleportService:TeleportToSpawnByName(ID, spawnName, player) player.Character.Torso.Anchored = true end end scr...
79607
1
How can i get the player when using :FireClient?
42996396
zmonds
7
2018-08-14 16:37:07
<p>I've been stuck on this and i can't find anything on the wiki</p>
65461
1
63338
6
156586483
Leamir
2963
2018-08-14 16:41:03
<p>Hello, zmonds!</p> <p>On the event, you recive a parameter, the player</p> <p><a target="_blank" href="https://wiki.roblox.com/index.php?title=Remote_Functions_%26_Events#Client_to_Server">I found this scripts on roblox official wiki</a></p> <pre class='brush: lua'>-- LocalScript local ReplicatedStorage = game:GetSe...
1
Player not valid member of workspace??
433962773
theking66hayday
762
2023-02-09 16:10:50
<p>I am trying to make a <code>local</code> variable for my local script in a Gui Button. I am trying to identify the player's house. When a player spawns their house in workspace the house model is called (I am using my username as an example): <code>theking66hayday'sHouse</code> Here is my local script:</p> <pre clas...
133045
2
120144
1
15438711
pwx
1571
2023-02-09 19:16:14
<pre class='brush: lua'>local Players = game:GetService('Players') local Player = Players.LocalPlayer script.Parent.mouseButton1Click:Connect(function() local House = workspace:FindFirstChild(Player.Name.."'s House") if House then -- do stuff here end end) </pre>
1
Map selector not selecting maps after 0 seconds?
297242360
antoniorigo4
99
2020-09-13 09:26:30
<p>I'm making a map selector for my game, The map gets selected but at 0 seconds it becomes negative and doesn't switch the map.</p> <pre class='brush: lua'>local timeleft = 25 local timecounter = Instance.new("Hint",workspace) function mapselect() local random = math.random(1,#game.Lighting.Maps:GetChildren()) ...
113111
1
103833
1
126659427
VerdommeMan
1162
2020-09-13 09:39:46
<p><code>if timeleft == "0" then</code> change the <code>"0"</code> into <code>0</code> timeleft is a number not a string</p>
0
Roblox Live Member Group count not working?
74909795
Warriorfoox
25
2019-07-04 00:32:11
<p>I've been recently trying to figure out how to make a live member group count in-game but it prints off the error</p> <pre class='brush: lua'>21:53:49.534 - Workspace.Part.SurfaceGui.Script:5: attempt to index a nil value 21:53:49.535 - Stack Begin 21:53:49.535 - Script 'Workspace.Part.SurfaceGui.Script', Line 5 - g...
82935
0
Help with chat?
18369403
Lem0nzz
5
2014-04-16 13:30:11
<p>So I've been thinking of a msg:lower() like script, so if you say "MainMenu/", it will make a GUI pop up, but only for your PlayerGUI, how would you do this?</p>
2146
0
How do I detect if a key is let go on a keyboard (ContextActionService)?
20960275
GShocked
150
2016-09-04 21:45:54
<p>I need to detect key presses, but I also need to detect when the key is let go. I want to use ContextActionService so I can easily detect input across platforms without changing my script, but I don't know how to detect when the key is let go.</p> <p>Here's a gif of my airplane flaps moving: <a target="_blank" href=...
35333
0
Touched event not firing?
705228985
Turtleraptor372
0
2020-10-17 22:53:55
<p>I am trying to code for a Tower Defense game, and i have run across a problem with the elevators to send players to the map(Technically I am using submarines, not elevators). I used a touched event to make the player go into the sub when they touch a box I made. The script then check to find the next seat not occupi...
114495
0
Recursive table function causes stack overflow?
2143630
MrgamesNwatch
65
2014-07-11 07:31:27
<p>So I wrote this function to print the contents of a table for debugging purposes. I've tested it in cases that I have generated, but I keep getting stack overflow errors when using it on certain tables (these being ones made by the Roblox Animation Editor, so I don't exactly know their contents hence the function) ....
7930
1
10308
1
386992
BlueTaslem
18062
2014-07-11 17:30:33
<p>Lua has a max recursion limit of 16,000+.</p> <p>Tables shouldn't be that deep. One possibility would be circular references in tables, for example, something like this:</p> <pre class='brush: lua'>local one = {}; local two = {}; table.insert(two,one); table.insert(one,two); </pre> <hr /> <p>What exactly you want to...
0
Teleport script not working correctly?
1529783691
WeirdTurtleKid
26
2020-10-18 15:02:04
<p>I was trying to add this script to my admin script but I got the error:</p> <p>"cannot resume non-suspended coroutine"</p> <pre class='brush: lua'>TextButton.MouseButton1Down:Connect(function() local txt = TextBox.Text local chr1 = game.Players.LocalPlayer.Character local chr2 = game.Workspace:FindFirstC...
114522
0
How to convert angular velocity to linear velocity?
92726442
y3_th
176
2020-02-14 00:53:39
<p>I have a BasePart with zero friction that I want to inherit the velocity of the BaseParts beneath it. When it comes to linear velocity, all I have to do is add the velocities of the BaseParts, then add whatever additional velocity I want on top of it in order to achieve my goal.</p> <pre class='brush: lua'>function ...
94553
1
87345
0
92726442
y3_th
176
2020-02-14 12:26:15
<h1>Preface</h1> <p>It seems that I was over-complicating this question for anyone to understand, so I've figured out a solution and posted it here. Converting angular velocity to linear velocity was actually easier than I thought.</p> <h1>Prerequisites</h1> <ul> <li>An understanding of the formula for the length of an...
0
How can I make a script only work for a specified team ?
944193208
krumplihun22
0
2023-01-18 20:04:04
<p>I want to make my code only work for one team so none of the players that are not in the specified team can use this script</p> <p>The code:</p> <pre class='brush: lua'><br />function onPlayerEntered(newPlayer) local stats = Instance.new("IntValue") stats.Name = "leaderstats" local cash = Instance.new("I...
132889
0
How to fetch a players name using a script?
169575230
Diamondstarracer33
0
2022-06-23 05:34:42
<p>I realised I did not explain it well in the last post but what I am looking for is the brickblast not spawn when a players joins or when the character spawns. What I am looking for is the model to be in server storage and in the model will have a script. When the model gets added to workspace the script inside the m...
130474
0
Help with messages?
19517471
bloonblaster2000
55
2014-05-08 16:14:35
<p>Is this how it would be?</p> <p>H = game.Workspace.Part</p> <pre class='brush: lua'>local debounce = true function onTouch(Part) if debounce and Button.Parent:FindFirstChild("Humanoid") and Button.Parent.Name == game.Players:findFirstChild(Button.Parent.Name) then debounce = false function onTouch(Part) Instance.new...
4523
3
6117
1
5813499
geckohero17
55
2014-05-08 16:24:27
<p>To some extent, yes. But you need to remove the message after a small while, otherwise your game will get message spam. You may even want to add intervals between when the message can be activated or not.</p> <p>--Example:</p> <p>enabled = true H = game.Workspace.Part</p> <p>function onTouch(Part) if enabled == true...
0
How do you change the aim button on the FE gun kit edited 2021?
1466374332
subblox1234
5
2021-02-19 17:35:04
<p>The edited FE gun kit 2021 is great but when you have a sniper I wanna change the LMB button to aim to Q or E, cuz some people don't have a mouse. If anyone knows pls tell me how!</p>
120369
0
Infinite yield possible? What does it mean?
77889370
Lukeisbossman64
73
2017-11-03 01:16:14
<p>Hiya! I'm having some trouble with a script...it's a problem I've encountered in the past but I was never able to figure it out. Take a look:</p> <pre class='brush: lua'>local enable = true local player = game.Players.LocalPlayer local anime = script:WaitForChild('Animation') script.Parent.MouseButton1Click:connect(...
49090
1
how to put a script be parented by the Instance.new(part, workspace) ?
1088503703
carrotboardgame
11
2021-06-04 12:44:06
<pre class='brush: lua'>local part = Instance.new(part, workspace) """ want to put a script be parented by the part""" </pre>
124065
1
113100
0
429417358
Bankrovers
226
2021-06-04 14:41:14
<pre class='brush: lua'>local Script = script --Get the script Script.Parent = game:GetService("Workspace") --Parent the script </pre>