question_score
stringclasses
21 values
title
stringlengths
6
119
question_userid
stringlengths
4
10
question_user
stringlengths
3
20
question_user_score
stringclasses
496 values
question_datetime
stringdate
2014-02-01 23:57:31
2023-04-02 01:40:15
question
stringlengths
0
11k
question_id
stringlengths
1
6
answer_count
stringclasses
8 values
answer_id
stringlengths
0
6
answer_score
stringclasses
18 values
answer_userid
stringclasses
946 values
answer_user
stringclasses
963 values
answer_user_score
stringclasses
692 values
answer_datetime
stringlengths
0
19
answer
stringlengths
0
10.7k
1
how come this wont move straight?
37735834
bubbaman73
143
2014-07-11 04:41:03
<p>im changing a crushing wall script for my Deathrun 2 map (dont mind the strings Wsly wrote them) and it moves kinds tilted, how do i make it move in 1 direction straight?</p> <pre class='brush: lua'>-- Waiting Animation Decal = script.Parent.Decal Locked = game.Workspace.Data.Images.WaitTimers.Locked.Value ClockA = ...
7927
0
Player List GUI Isn't working properly? (Script inside)
101879484
XxSHjokerxX
18
2016-06-06 22:09:16
<p>I did a test server with 3 players in roblox studio.</p> <p>player1 joined and then player2 and then player 3</p> <p>Player1's playerlist had player1 and 2 and 3. Player2's playerlist had 2 and 3. Player3's playerlist had only 3. ??!?!?!?</p> <p>I have a folder inside Workspace called PlayerListFolder which has a sc...
31480
0
How i teleport all players to multiple models (named tp)?
506839197
Omerevkizel
31
2020-08-01 15:28:14
<pre class='brush: lua'>game.Players.LocalPlayer.Character.Torso:MoveTo(game.Workspace.MapStorage.Model.tp </pre> <p>and they dont tp computer says:</p> <p>ServerScriptService.GameSelect:20:attempt to index nil with character.</p>
110476
2
101472
1
289886453
msdarckdu802
20
2020-08-01 16:01:09
<p>Do</p> <pre class='brush: lua'>game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = game.Workspace.MapStorage.Model.tp.CFrame </pre> <p>instead, if you R15 or</p> <pre class='brush: lua'>game.Players.LocalPlayer.Character.Torso.CFrame = game.Workspace.MapStorage.Model.tp.CFrame </pre> <p>if you use R6</p>
2
Why script isnt working?
39451928
digitalzer3
123
2014-05-08 18:53:07
<p>Im trying to clone a cloud called cloud1 heres my script:</p> <pre class='brush: lua'>clonecloud1 = script.Parent:Clone() config = script.Parent.Configuration clonenumb = script.Parent.Configuration.clonenumb.Value </pre>
4527
2
6129
1
11019494
JJ_B
250
2014-05-08 21:17:18
<p><code>script.Parent.[whatever]:Clone()</code> You need to say what you want to clone inside the script's parent.</p>
0
Why does my attached object to a player fling people off the map?
357145284
Hwk3rAlt
14
2019-07-09 19:06:57
<p>It doesn't collide, nor is it anchored, and when a character walks up to me, they get pushed back at a high velocity, or even off the map entirely.</p> <pre class='brush: lua'>function weld(p0, p1, p) local weld = Instance.new("WeldConstraint") weld.Part0 = p0 weld.Part1 = p1 weld.Parent = p end game...
83332
0
How do I rotate decals without rotating the part the decal is on?
1105943456
Aqil_Whiz
2
2019-11-13 01:45:30
<p>I tried putting a decal on a cylinder but it is rotated sideways.</p>
89964
0
Why/How do I fix a letter/number that highlights black?
14768734
DrAmato
0
2015-02-22 20:06:41
<p><em>Why/how do i fix a letter/number while I am editing/producing a script that out of the blue highlights black,and then when I delete a letter,it deletes the whole word? Does anyone else have this problem?</em></p>
15221
2
Trying to save a folder inside a player, what's wrong?
62087109
Raccoonyz
893
2020-02-08 23:33:28
<p>Hi. I have a folder inside a player (not the character) and I want to save it in a datastore. However, it doesn't seem to work. I'm highly confused, any help?</p> <pre class='brush: lua'>local DS = game:GetService("DataStoreService"):GetDataStore("Items") game.Players.PlayerAdded:Connect(function(plr) wait() ...
94323
0
[SOLVED] How to access a dictionary in ModuleScripts?
272859903
Miniller
562
2019-08-13 10:07:12
<p>I'm trying to make a votekick script and I use a modulescript for it, however I can't get it to work. Let's say I have a module script what looks like this:</p> <pre class='brush: lua'>local Configuration = { ["Blacklist"]="blabla" } return Configuration; </pre> <p>My script detects if the user writes ;votekick to t...
85664
1
79490
1
39939779
EpicMetatableMoment
1444
2019-08-13 11:15:42
<h2>Question</h2> <blockquote> <p>How to access a dictionary in ModuleScripts?</p> </blockquote> <h2>Answer</h2> <p>The same way you index a dictionary anywhere else.</p> <pre class='brush: lua'>dictionary[key] </pre> <h3>Whats wrong with your code?</h3> <p>It appears you're trying to index the string <code>"blabla"</c...
4
Maintaining an equivalent distance UDim between differently Sized GUIObjects? [Solved]
74087102
Ziffixture
6785
2019-01-10 07:16:05
<p>I’m writing a <code>CustomChat</code> and I’ve got far enough to properly adjust the <code>YOffset</code> length judging if the #<code>Characters</code> returned are greater than the <code>AbsoluteSize.X</code> of the <code>ChatLabel</code> to “drop a line”. Yet as much as I try I cannot seem to determine a proper t...
74176
0
How can I make a part I spawn on my player spawn a few studs away instead of directly on it?
79523404
snipperdiaper
116
2022-05-03 22:20:29
<p>Hey everyone, I am yet again asking for your assistance.</p> <p>Here is the script:</p> <pre class='brush: lua'>local tool = script.Parent local player = game.Players.LocalPlayer tool.Activated:Connect(function() local part = game.Workspace:FindFirstChild("BariWall") local ClonedPart = part:Clone() part....
129905
0
GUI Leaderboard
54423626
ChandlerTech
5
2014-02-17 06:23:16
<p>How do you make a leaderboard with decals, Like Legacy 3.</p>
26
1
52
2
13416513
Merely
2122
2014-02-17 06:40:50
<p>Creating a GUI leaderboard is a big task - this is too big to fit into a single question. We are willing to help out with single steps along the way, but we will not write your code for you.</p> <p>First off, do you know the basic steps for creating a ScreenGui, and creating TextLabels and ImageLabels? If you need s...
0
How to make a square Gui that scales with the screen?
143096970
Rayguyban2
80
2021-05-03 22:03:03
<p>I am trying to make a square settings buttons but the problem is that if I use offset it will appear small in big screens and big in small screens scaling does not work because it could appear square in my screen but rectangle in another type of screen, I tried all the ui constraints but none of them helped I am sta...
123067
1
112139
1
1708043824
TheLuminent
970
2021-05-03 22:36:49
<p>You should consider <a target="_blank" href="https://devforum.roblox.com/t/plugin-autoscale-lite-for-guis-scale-your-ui/217704">AutoScale</a>, it can be used to scale your Gui elements properly.</p> <p>If your settings button is an <a target="_blank" href="https://developer.roblox.com/en-us/api-reference/class/Image...
0
How would I convert CFrame to Vector3?
20480568
Lord_Hagenost
40
2016-08-11 17:04:36
<p>So, I'm making a DBZ game, and I need to move a part along a ray or part. In order to draw this beam/part I need 2 Vector3 values, I've got the Handle of the tool and the Mouse.Hit (Which is CFrame)</p> <p>Is there anyway to convert a CFrame to Vector3?</p> <p>Scripts:</p> <p>Local Script in a Tool</p> <pre class='b...
34418
0
I need you to help me fix this error in my simulator game. That's all?
474097884
komanos212
2
2022-09-11 12:14:34
<p>Hi, I need help. I was making an simulator and this error showed up: 14:08:45.976 Argument 1 missing or nil - Client - BuyScript:78 Script:</p> <pre class='brush: lua'>local Player = game.Players.LocalPlayer local RS = game.ReplicatedStorage local TS = game:GetService("TweenService") local UIS = game:GetService("Use...
131588
3
How can I listen for when multiple bricks touch something?
49776603
TomsGames
225
2014-02-21 14:41:25
<p>This is the current layout of my script:</p> <p>http://gyazo.com/30d6b94f738d29ffd6e3ee351ac9ddff</p> <p>The script does not function, as a question I posted before somebody said local and non-local scripts do not function inside the camera. Right.</p> <p>So I have multiple 'hitsensors' in this car (which is inside ...
197
1
How to get account age from UserID?
151268598
NordicM
77
2020-04-27 17:54:05
<p>I want to be able to find players account age without them being in the game. It's easy to find players account age when they are in the game...</p> <pre class="brush: lua">local player = game.Players.NordicM --Using my IGN for this example print(tostring(player.AccountAge)) </pre> <p>Is there any possible way to ge...
100967
0
Rainbow Magic carpet GamePass?
746722812
thestorm2897
10
2020-08-11 23:41:53
<p>It works if you don't own gamepass but if you own gamepass and join you don't have it in backpack I was doing this in studio</p> <pre class='brush: lua'>local ReplicatedStorage = game:GetService("ReplicatedStorage") local MPS = game:GetService("MarketplaceService") local Players = game:GetService("Players") local Ma...
111199
0
CANT ROLL ball when attached. What do i do???
1098704750
Trampyling
36
2020-08-29 16:00:46
<pre class='brush: lua'><br />function AttachBall(part,ball) local Attacher = Instance.new("WeldConstraint",part) Attacher.Part0 = part Attacher.Part1 = ball end local Character = script.Parent local RootPart = Character:WaitForChild("UpperTorso") or Character:WaitForChild("Torso") local Ball = Instance.new...
112360
1
How can I make this print an output with AM/PM?
36764646
Devotional
210
2014-12-02 04:56:37
<pre class='brush: lua'>function sTime() t = tick() local sec = math.floor((t%60)) local min = math.floor((t/60)%60) local hour = math.floor(math.fmod((t/3600),24)) print(hour) if not (sec&lt;10) then sec = math.floor(sec) else sec = "0"..math.floor(sec) end ssec = sec mmin = tostring((...
12949
1
15982
4
64408300
RaverKiller
668
2014-12-02 07:27:59
<pre class='brush: lua'>function sTime() t = tick() local sec = math.floor((t%60)) local min = math.floor((t/60)%60) local hour = math.floor(math.fmod((t/3600),24)) print(hour) if not (sec&lt;10) then sec = math.floor(sec) else sec = "0"..math.floor(sec) end ssec = sec mmin = tostring((...
0
Help me? Please?!
38717324
foxy83
15
2014-06-04 23:10:37
<pre class='brush: lua'>function fire() a = Instance.new("Part",Workspace) a.Position = Workspace.deedum.Torso.Vector3.new a.Shape = "Ball" a.BrickColor = BrickColor.new("Cyan") local part = Instance.new("Fire") part.Parent = Workspace.a a.Transparency = 1 end </pre> <p>I have the basics down, now how do I get another ...
6176
2
8199
3
29251132
HexC3D
830
2014-06-04 23:45:03
<p>Name the script fire(the on that you wrote about) and put in Workspace.</p> <p>Then make the script called "fire" disabled property checked or true</p> <p>Then make another script in Workspace and in the script put this</p> <pre class='brush: lua'>fire = game.Workspace.fire fire.Disabled = false </pre> <p>That shoul...
0
How Can I Change the CanvasPosition with a TextButton?
463758281
Guest_99866
7
2022-06-20 14:58:58
<p>Ive used some code I wrote and It doesn't seem to work, can anybody help me out?</p> <p>heres my non-working code incase you are wondering: script.Parent.MouseButton1Click:Connect(function() script.Parent.Store.ScrollingFrame.CanvasPosition:TweenPosition(UDim2.new(0, 0), Enum.easingDirection.InOut, Enum.easingStyle....
130421
0
How do I make a intermission with my lobby in my game?
906277159
TheKittyKingOfficial
0
2021-01-28 02:54:33
<p>I have a game with a lobby, But no intermission, I can make the Gui but I don't know the scripts for it, I want the intermission to let you be in the lobby for 1:00 then you random spawn you on red or blue team then you have 5:00 to fight then the rounds ends and you get teleported to the lobby again, then it repeat...
119274
0
Saying Touched is a userdata Value? [CLOSED]
459692218
Nckripted
580
2020-04-11 19:45:48
<p>So, I was making a script to teleport players into a car, and I could not figure out for the life of me why I was getting this error:</p> <pre class="brush: lua">14:39:18.497 - Workspace.Part.Script:53: attempt to call a userdata value 14:39:18.498 - Stack Begin 14:39:18.499 - Script 'Workspace.Part.Script', Line 53...
98886
5
Why won't my street lights turn on or off??
433962773
theking66hayday
841
2023-01-12 17:07:56
<p>I am trying to turn my street lights on and off when it hits a certain time. I want them to turn on at 180000 and off at 6.65 there are no errors. It just doesn't work at all.</p> <p>Script:</p> <pre class="brush: lua">local onLight = script.Parent.StreetLightTimer.Lampstick.Lightpart.onLight local offLight = script...
132816
2
119966
2
559514967
T3_MasterGamer
2189
2023-01-14 11:28:28
<p>Use my answer from <a target="_blank" href="https://scriptinghelpers.org/questions/132345/how-to-fix-my-script-that-change-music-between-day-and-night">an old question I solved</a>. Don't worry I explained everything in that question.</p> <pre class="brush: lua">local onLight = script.Parent.StreetLightTimer.Lampsti...
0
How can I move a part's position to the HumanoidRootPart?
92616361
Kegani
31
2018-03-17 16:31:49
<p>Hello</p> <pre class='brush: lua'>function onClick(noot) local val = script.Parent.Parent.TextBox.Value.Value local text = script.Parent.Parent.TextBox val = text.Text local plr = game.Players:FindFirstChild(val) local val2 = script.Parent.Parent.dis.Value.Value local text2 = script.Parent.Pa...
55201
2
54026
0
193694100
dispeller
200
2018-03-17 23:33:07
<p>Hey there!</p> <p>Judging from your comments, I see that you don't want to set a position, but you want to do what is commonly referred to as "tweening".</p> <p>There is this cool thing called <a target="_blank" href="http://wiki.roblox.com/index.php?title=API:Class/TweenService">TweenService</a>, and it makes life ...
0
Humanoid:ApplyDescription() doesn't load accessories correctly?
34716028
cmgtotalyawesome
1418
2019-12-31 20:52:57
<p>I have found the solution to my previous problem with changing the character's skin mid game. I am now using the :ApplyDescription() API and it was working perfectly until I tried to use my own skin. The accessories load in but they spawn in weird positions such as inside my torso or a little bit behind my head. Doe...
92300
2
Can you make a tool force equip?
36732308
jimborimbo
94
2016-01-25 20:33:36
<p>I was wondering if you could make it so a tool can't unequip.</p> <p>If you know whether it can or not, and you know how to do it, please answer. Thanks!</p>
26671
0
How to fix ROBLOX Animations being broken/buggy when playing my game?
60058151
MentallyDisturbedNub
0
2021-06-10 18:30:43
<p>Hello there! I decided to try ROBLOX animations today, and came across an issue. I have a set of animations and a script to run them one by one. When I press the "run" button in ROBLOX Studio, the animations work flawlessly, however when I press "Play" instead, and join the game, the animations seem to be somewhat <...
124253
0
How to make borders without using parts?
176594891
CrazyCats84
43
2020-08-06 13:01:24
<p>So basically i want to make a invisible box border thing, but if i use invisible parts for some reason, it breaks the 3D atmosphere, basically making the sun invisible, and i dont want an invisible sun, so i need to use a script to get the X, Y and Z Co-Ordinates, basically if you go past the X Co-Ordinate of 500 fo...
110832
0
How can I make my torso visible in my first person game?
342738697
HonestlySmile4meee
0
2022-08-07 23:56:25
<p>In my game it needs to be in R6, but every time I test it my torso disappears. If I put it in R15 it works perfectly fine. -</p> <p>local camera = workspace.CurrentCamera local player = game.Players.LocalPlayer local character = player.Character local humanoid = character.Humanoid</p> <p>player.CameraMaxZoomDistance...
131138
0
How to calculate the distance between two CFrames??
379782887
Shounak123
427
2022-05-02 06:56:49
<p>Well, the title says it all. How to calculate the distance between two CFrames??</p> <p>or, How many studs is the distance from <code>Point1</code> to <code>Point2</code>??</p>
129890
0
Can someone fix me this script? its a fire all touch interest script (contact me Someone#9827)
588128183
mrsfabo
0
2019-07-25 07:13:11
<pre class='brush: lua'>for i,v in next, workspace:GetDescendants() do if v:IsA'TouchTransmitter' then table.insert(Tab,v) end end local plr=game:GetService'Players'.LocalPlayer spawn(function() local UIS=game:GetService'UserInputService' UIS.InputBegan:Connect(function(Key) if Key.KeyCo...
84404
0
why my rank does not change when i write this script?
335945120
Blackbooks
10
2020-08-01 09:33:14
<p>i trying to add rank system in the game, but the script that i write doesnt change the leaderstats value</p> <pre class='brush: lua'>game.Players.PlayerAdded:Connect(function(player) local stats = Instance.new("Folder", player) stats.Name = "leaderstats" local ilmu = Instance.new("IntValue", stats) i...
110453
0
How to make Max Health increase with Levels?
190475375
Never2Humble
81
2016-12-09 04:26:42
<p>Hello!</p> <p>I am trying to make the Max Health of a player increase as they level up. I've included the entire leaderboard script below, All of it works fine when I remove the Health portion of the script, but I'd really like to get that part functioning too. I've approached it several different ways, generally ge...
37853
3
40292
1
36267651
BlackJPI
2643
2016-12-09 04:48:42
<p>The error is because 'plr' is not a member of workspace, it is instead a player object. Also, 'Health' is not a member of plr.</p> <p>If you want to to implement this you are going to need to get the character of the player and set the health of that character'a humanoid to the desired max health. But theirs another...
1
textbutton isnt appearing in roblox studio game thing but is when i press stop?
200370018
Skymarek
4
2022-09-11 08:57:47
<p>so im trying to make it so when you click the play button, the textbutton which is the shop button appears, i made it in localscript so it does .Visible = true it didnt work and i tried clicking on it while in game and set it to visible and it didnt appear too but when i click stop and im in like the game viewer it ...
131586
1
118841
0
559514967
T3_MasterGamer
845
2022-09-11 09:29:45
<p>Ahh, I see. From your video, I can see that you're getting the Shop button by StarterGui. <strong>Always remember that you can't get a button from the StarterGui when the game starts.</strong> It's because when the game starts StarterGui will be moved to the client player and be renamed to "PlayerGui". Instead, you ...
0
Traying to make my Q key Dash Me up In the air but ,its just Teleporting me instead?
211223681
FilthyMonsterPlays
13
2021-07-21 20:48:30
<p>all this Script is Doing is teleporting me Int the Air. I Want To make it so that it's like a Dash upwards and not a teleport meaning there is a transition how would I go on about doing that.</p> <pre class='brush: lua'>local player = game.Players.LocalPlayer local UIS = game:GetService("UserInputService") local Twe...
125573
1
Why does an error i get not show the script that causes the error?
1593155829
OreyTheOre
37
2021-06-08 16:38:23
<p>Hello, <strong>Attempt to connect failed: Passed value is not a function</strong> keeps on getting into my output and for some reason it's not showing me the origin of the script. What causes the way it doesn't show the original script that gives me the error(s)?</p> <p>I know how to fix it, i just can't find the sc...
124199
0
CollectionService is not using everyone properly?
147305218
PeterParker17386
16
2023-03-16 13:17:24
<p>Im making a game where the npcs stare at you and I am trying to use <code>CollectionService</code> to make all the npcs look at the player but only one is facing the player. This is the script:</p> <pre class='brush: lua'>RunService = game:GetService("RunService") CollectionService = game:GetService("CollectionServi...
133198
0
Is there a safe way to prevent resetting?[Don't answer]
13667373
EzraNehemiah_TF2
3552
2015-03-16 00:14:44
<p>I know how, just change the humanoid's name, but is there a way to do it safely? Because if you do it this method, it will not allow the player the regen health! Which is a big problem. Thanks if you find a way.</p> <hr /> <p><strong>EDIT</strong></p> <p>I don't want to change the humanoid's name or else I need to k...
15804
1
Why does this random bool script not work? More details in text below.
153122776
itsmtninja
11
2022-09-16 18:45:26
<p>I want the right to be true, and the left to be false, or vice versa. All I get is both true, both false or sometimes it works.</p> <pre class="brush: lua">game.workspace.r1.CanCollide = math.random(1,2) == 1 if game.Workspace.r1.CanCollide ~= true then game.Workspace.l1.CanCollide = false end game.workspace.r2....
131643
1
118900
0
110029109
loowa_yawn
261
2022-09-17 23:26:01
<p>There is a much more efficient way of completing this task, which also allows for expandability.</p> <p>Explanations are left in comments inside the code chuck below.</p> <pre class='brush: lua'>-- initialise a new variable with the amount of parts inside workspace PARTS_COUNT: number = 9 -- create a for loop for in...
0
Why does it keep on shootin after i unequip it?
1752724383
Xyternal
220
2022-07-30 00:50:57
<p>I scripted a gun, and it works perfectly fine. But the thing is, if I hold left mouse button down and unequip it at the same time, it still keep shooting. How do I fix this?</p> <pre class='brush: lua'><br />local tool = script.Parent local player = game:GetService("Players").LocalPlayer local shooting = false local...
131003
1
How to only give one gear on touch and not a million?
37745860
BunjiBloxxer
51
2022-07-13 13:09:29
<p>I have a badge that gives the player a teddy bloxpin gear, but it gives them a million of them, I want it to give them 1.</p> <pre class='brush: lua'>local badgeservice = game:GetService("BadgeService") local id = (2127329720) script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") t...
130769
2
118073
0
83913425
kodymarcey
49
2022-07-13 14:24:03
<p>You could try finding that item inside their backpack, and if they already have it, then don't give it to them again. Maybe something like this:</p> <pre class='brush: lua'>script.Parent.Touched:connect(function(plr) local player = game.Players.LocalPlayer script.Parent.Touched:Connect(function(hit) ...
0
How does enum work, and what can it be used for?
77996699
dragonspade21
15
2019-10-29 18:16:25
<p>Hello, I am currently trying to study enumerations, but I am not quite understanding what the roblox dev website means. So I understand it takes a set of values, but what does it do with them? what type of values does it take? How do you know when you should use an enum or not? It would be much appreciated if you ca...
89390
1
82789
0
80886314
VitroxVox
884
2019-10-29 18:43:15
<p><strong>Enumeration</strong></p> <p>An “Enumeration”, or “Enum”, is a special data type that can take one of a set of values. What this means within ROBLOX, is there are set options that certain properties' values can be equal to, and these are enforced with the <code>Enum</code> data type.</p> <p>The reason you may...
0
why wont my screengui show up when your touching a block?
558985246
HKprogram
39
2020-07-25 16:44:20
<p>I am sorry for my bad explaining here:</p> <p>I have a Script Which will Show An Gui. I've set Visible to false on properties</p> <p>The problem is that the gui wont show up when i touch the part.</p> <p>Heres the script:</p> <pre class='brush: lua'>local parent = script.Parent local Gui1 = game.StarterGui.WelcomeSc...
109934
1
101051
0
566296650
raid6n
2290
2020-07-25 16:51:18
<p>First, you forgot the debounce variables, and you're doing it incorrect, second, make sure WelcomeScene is visible as well, and use PlayerGui so it's visible for only the person who touched it. Also, make sure script.Parent is the part.</p> <p>Code:</p> <pre class='brush: lua'>local debounce = false script.Parent.To...
2
Best Way to Smoothly Move Player from Part to Part? (No Teleportation)
98374009
x_Tso
48
2019-07-30 02:14:32
<p>Hi! So I'm working on overhauling the battle-gameplay of something I've been working on, and to put it short, the player will, from time to time, have free movement of 3 pre-defined "zones." An "A-Zone," "B-Zone," and you can guess what the third zone is called.</p> <p>I've chalked up a couple ideas, one that uses H...
84695
2
78582
1
71379989
whenallthepigsfly
541
2019-07-30 02:31:30
<p>Roblox has a great service built in to do just this! It's called the <a target="_blank" href="https://developer.roblox.com/en-us/api-reference/class/TweenService">TweenService</a></p> <p>Tweenservice can be used to smoothly transition between any part state like color, opacity, <em>position</em> or anything else.</p...
0
Trying to make a lucky block that gives a random item every 5min but it only works in studio?
366089233
adamokrokadado
0
2023-01-13 16:06:21
<p>local Handle = game.Workspace.Handle local RandomItemGiver = game.Workspace.RandomItemGiver local BarrierLucky = game.ReplicatedStorage.BarrierLucky</p> <p>script.Parent.Triggered:Connect(function(player) local loot = game.ReplicatedStorage.Loot:GetChildren() local chosenloot = loot[math.random(1,#loot)] chosenloot:...
132823
0
Is There A Way To Make This Discord Script Any Better I don't know if there is?
266723646
AIetheo
236
2017-10-24 23:50:25
<p>Heres The Script:</p> <pre class='brush: lua'>local http = game:GetService("HttpService") game:GetService("Players").PlayerAdded:Connect(function(player) if not game:GetService("RunService"):IsStudio() then local date = os.date("!*t") local Data = { ["content"] = player.Name.." joined...
48875
0
How do you check if text is a number?
990574115
masilasi2008
2
2022-10-30 12:42:53
<p>Basically, what I want to do is have the player able to put a amount of cash into a textbox and if the input isn't valid, the placeholder text will switch to "Not valid amount of cash!". If you know the solution to my problem please post below. Thanks</p>
132083
1
119299
0
245864252
xInfinityBear
1335
2022-10-30 13:51:09
<p>You can use the <code>tonumber()</code> function to convert a string to a number. If the string has no number representation then the function returns nil. This function will also return nil if the string has something other than a number; for example, <code>tonumber("1234f")</code> will return nil because it has a ...
0
Why won't this loop run?
4330521
whyOmustOitObeOme
7
2014-11-29 19:05:50
<p>I have a script that slides a frame across the screen when it turns visible.</p> <pre class='brush: lua'>function changed() local frm = script.Parent if frm.Visible == true then frm.Position = UDim2.new(0, 420, 0, 0) local value = script.Value.Value value = 0 repeat ...
12854
1
15899
1
386992
BlueTaslem
18066
2014-11-29 19:26:52
<p>You're modifying <code>frm</code> in your loop, and then waiting. But whenever <code>frm</code> is <code>Changed</code>, you reset the position (line 4).</p> <p>Chances are the loop is running, there are just more and more of these loops undoing each other.</p> <hr /> <p>One option is to not used a <code>Changed</co...
0
How do I break this loop when it finds an an empty value?
42834980
TheGreenSuperman
85
2018-12-21 19:52:17
<p>I am trying to make a part teleport the player to a part (lets call this door) that is not taken, so that if multiple players touch "door" it will line them up instead of teleporting a player to a position that is taken, but when I run this code it does not stop, and instead goes through all of the parts stopping at...
72674
1
68755
1
9552668
SteamG00B
1633
2018-12-21 21:53:30
<p>Add some debounce:</p> <pre class="brush: lua">local touch = false local Door = script.Parent.Parent Door.TeleIn.Touched:Connect(function(p) if not touch then touch = true --do your stuff wait(1) --waits 1 second before allowing another touch event to do anything touch = false ...
0
How can I make a script without Humanoid:LoadAnimation?
1961959172
imnotaguest1121
362
2022-02-12 03:43:31
<p>I decided to use this script:</p> <pre class="brush: lua">local animation = script:WaitForChild('Animation') local humanoid = script.Parent:WaitForChild('Humanoid') local dance = humanoid:LoadAnimation(animation) dance:Play() </pre> <p>But It didn't worked, I was wondering why and founded out that Humanoid:LoadAnima...
128945
1
116744
1
1288500822
Finty_james
269
2022-02-13 00:40:48
<p>There is something that was replacing <code>Humanoid</code> for <code>:LoadAnimation</code> method. It is called <code>Animator</code>. <code>Animator</code> uses <code>:LoadAnimation</code> now. So instead of doing the method you used, you should do this:</p> <pre class="brush: lua">local animation = -- your animat...
0
Is there a KeyByte for &quot;Space&quot;?[Figured Out]
41100413
BSIncorporated
640
2015-05-08 03:14:34
<p>I'd like to know when a player jumps, but not by using the humanoid jump event</p> <p>Since I figured it out myself, I thought I'd give the answer: As the keydown for <code>f</code> is "f" the keydown for <code>space</code> is " ", make sure to include a space.</p>
17354
1
20739
0
2869366
Paldi
109
2015-05-08 03:17:21
<p>it think you only need to put a space like this : " "</p>
1
If statement being skipped, why?
298601547
SyntheticFile
9
2022-06-24 00:54:06
<pre class='brush: lua'>local List = {1,50,9,6,4,91,125} local RequiredSurvivors = 3 local IterationsCompleted = 0 local IterationsRequired = 5 --print(#List) local function NewDescendant(i) local Ancestor = List[i] local Descendant = Ancestor + math.random(-5,5) print(Descendant) table.insert(List,Desc...
130487
1
117829
1
76938451
AZDev
590
2022-06-24 01:35:55
<p>It's been a while but I'll try to explain this as well as I can.</p> <pre class='brush: lua'><br />-- lets make this slightly simpler. if not 1==1 then end -- this literally translates to if not true then --do stuff end </pre> <hr /> <pre class='brush: lua'><br />if not 1==2 then end -- this literally translates...
1
Help me with tool welds breaking?
38247353
coo1o
227
2014-03-05 10:28:47
<p>Whenever I make weld my tool together, the weld DOES hold but when I equip the tool again, miniature parts are scattered EVERYWHERE. I observed it a bit and the welds break when the tool is unequipped, not when it is re-equipped. Only one weld survives and that's the weld that's welded to the parent of all welds (i....
499
1
827
5
947798
MrNicNac
855
2014-03-05 14:45:37
<p>Here's a more dynamic tool weld script that will recycle existing welds. It should keep a static memory count instead of losing track throughout the game. Basically it'll keep a clone of the original weld handy and re-weld the tool every time it's equipped. The old joints have a tendency to just break away.</p> <pre...
1
Someone please explain Debounce?
10785587
Shaydesilva
85
2014-04-20 23:40:30
<p>Not a clue what it means, thanks!</p>
3079
0
What are the advantages/reasons of using ServerScriptService?
5206310
alibix123
175
2016-04-28 19:22:53
<p>I didn't really get the wiki explanation:</p> <blockquote> <p>A semantic, organized place to put your server-sided game logic, which does not interfere with the world. Scripts will run inside this service, and will not replicate to game clients, allowing for secure storage of your scripts.</p> </blockquote> <p>One r...
30062
1
33441
1
26148956
lightpower26
399
2016-04-28 19:32:47
<p>ServerScriptService is simply a place where you put a bunch of ServerScripts (Normal scripts) that don't have to modify the client. For example, in workspace, you have a bunch of parts for something like a fort or outpost or whatever. You usually want to be able to edit those scripts that are in workspace easily. Ho...
1
Why doesn't this script make my NPC jump when it touches a part?
173002126
Michael_TheCreator
166
2017-05-29 23:52:10
<p>So my script is supposed to make the NPC jump when it touches a part but not when it touches a part in a player but it doesn't work. Can anyone help me out?</p> <pre class='brush: lua'>local zombo = script.Parent.Parent:WaitForChild("Zombie") -- Name of NPC's Humanoid zombo.Touched:Connect(function(Hit) if Hit.P...
43379
0
Multiple short answer questions regarding scripting?
13970097
namelessassasin
30
2014-06-14 07:22:32
<p>What is ipairs and pairs? Example please</p> <p>What is an argument? Example please</p> <p>Is it laggier to make an animation by script then by using animation editor?</p> <p>What is the difference between the two connection lines, is one faster?</p> <p>Do I use "wait for data ready" when I want the script to run af...
6656
1
8800
0
35708167
Marolex
45
2014-06-14 15:30:33
<p>Ill do my best to answer your questions</p> <h2>in order from top to bottom:</h2> <p>ipairs is used to print values accordingly to their position in a table. for example:</p> <pre class='brush: lua'>table = {"a","b","c"} for i,v ipairs(table)do print(i,v) end </pre> <p>output: * 1 a 2 b 3 c *</p> <h2>wiki on ipairs:...
0
Need help with getting constants for this obfuscated script. Will someone help?
1394434380
MR_Enforcement
0
2022-04-30 22:32:15
<p>Hello, so I have a exploiter in my game and finally caught what he uses. When I went to the loadstring though the script was obfuscated (of course). I was searching through the web to see how to possible revert it to the normal script or something but I just couldn't do it. Could someone maybe do it for me and drop ...
129871
0
Why is the camera spassing out whenever I try to rotate it?
126313846
BrodyGamer101
35
2021-05-01 15:57:39
<p>CODE:</p> <pre class='brush: lua'>repeat wait() until script.Parent:FindFirstChild("Humanoid") local userInputService = game:GetService("UserInputService") local camera = workspace.CurrentCamera local leanDirection = nil local leanInc = 3 local defaultOffset = Vector3.new(0,0,0) local eOffset = Vector3.new(leanInc,0...
122996
2
Is it true that it's proper to use :Connect instead of :connect while scripting?
350424812
TheForgottenTale
23
2017-08-03 03:28:20
<p>Someone told me that I could improve by using :Connect instead of using :connect. Does it matter which one I use? I think it's one of those things that can work both ways.</p> <p>Example:</p> <pre class='brush: lua'>script.Parent.MouseButton1Click:Connect(function() </pre>
46151
2
46891
3
455333
cfiredog
274
2017-08-03 04:10:09
<p><code>:connect()</code> is deprecated, meaning that Roblox may remove its functionality at any point (i.e. the code is at risk of breaking). Items are deprecated when they are no longer meant to be used for an assortment of reasons. Some examples are that the original method was a typo or does not look like other pr...
1
How to make a game logger with https service?
911046840
GITSTP
4
2020-05-18 14:25:50
<p>Hi! I made a script where it would log a game if this is script was in my game and it wouldn't work :/</p> <pre class='brush: lua'>local Webhook = "I AM NOT SHARING WEBHOOK LOLLL" local http = game:GetService("HttpService") local Data = { ["content"] = ("https://roblox.com/games/"..game.PlaceId) } Data = http:JS...
103553
1
95702
0
237126800
TheWaildug
40
2020-05-19 17:22:02
<p>I rewrote the code a bit. Here it is:</p> <pre class='brush: lua'><br />local http = game:GetService("HttpService") local Webhook = --Webhook link here. Not going to leak mine! local Data = { ["content"] = "https://roblox.com/games/"..game.PlaceId } Data = http:JSONEncode(Data) http:PostAsync(Webhook, Data) </pr...
0
Why does it say that something is not a valid member of DataModel when it clearly is?
104801865
yasquerda
0
2021-01-13 20:32:36
<p>I am trying to access a bool value from a script but it keeps giving me an error message saying :(Name) Is not a valid member of DataModel "games name"</p> <p>(Name) is whatever the value's name is</p> <p>Does anyone have any advice on what to do? the script is just</p> <pre class='brush: lua'>workspace:WaitForChild...
118652
0
How to make the humanoid root part follow the direction of the mouse?
15787136
Earthkingiv
51
2018-01-04 17:39:28
<p>t=Instance.new("BodyGyro",script.Parent.Parent.Character.HumanoidRootPart) t.maxTorque = Vector3.new(0,math.huge,0) while true do Character=script.Parent.Parent.Character Player=game.Players.LocalPlayer mouse=Player:GetMouse() Character.HumanoidRootPart.BodyGyro.CFrame = CFrame.new(Character.HumanoidRootPart...
51576
1
51253
0
17356198
raik220
20
2018-01-04 18:09:51
<p>To do this I would use CFrame rather than BodyGyro.</p> <pre class='brush: lua'>local plr = game.Players.LocalPlayer local char = plr.Character or plr.CharacterAdded:wait() local root = char:WaitForChild('HumanoidRootPart') local mouse = plr:GetMouse() game:GetService('RunService').RenderStepped:Connect(function() ...
0
My model placement system is not working, it clones the model but doesn't move?(read desc)
816236594
BashGuy10
379
2019-08-26 04:26:07
<p>(I had to shorten the title because of the stupid 100 char limit)</p> <p>Hello! I'm having some troubles with my model placement, it clones the model but doesn't move it until you click again. AND doesn't clone another part. Help would be appreciated</p> <p>FYI: I'm using remote events</p> <p><a target="_blank" href...
86523
1
80176
1
2479393
Dfzoz
345
2019-08-26 04:37:19
<p>The problem is on the server script:</p> <pre class='brush: lua'>local place = game:GetService("ReplicatedStorage").Placement.Remotes.Place game.ReplicatedStorage.Placement.Remotes.Place.OnServerEvent:Connect(function(plr, building, position) local building2 = building:Clone()--Cloned the original building b...
1
How do I change the body colors?
37515669
DDDropTheBase
0
2014-05-09 00:39:53
<p>This is what I have:</p> <pre class='brush: lua'>while true do game.Players.LocalPlayer.findFirstChild("Body Colors").HeadColor.Color = Color3.new("Bright blue") end </pre>
4551
0
My script in TeleportService Won't work?
29798235
Neonridex
5
2014-04-15 04:44:29
<p>Hmm..... I want to make a Game (Not a place) with all places i have, but i can't. My code won't work, even that model can edit and got from a person. I tried all but.. won't work. Help me Guys What part of script is not working.</p> <pre class='brush: lua'>function onTouched(hit) local player = game.Players:GetP...
1522
0
How do I make it so once a part is touched, another part appears?
1569665107
PiggBlxx
2
2022-05-06 18:42:12
<p>I just wondered whether anybody could help me with my problem, in my game I’m working on I’d like to make it, once you have touched one part another part appears and becomes available, the game is that you spawn in a public toilet and discover a crack in the wall, the only problem is, is that I want people to go int...
129929
1
117375
0
84197866
plooring
55
2022-05-06 20:49:37
<p>Put this script inside of a part.</p> <pre class='brush: lua'>script.Parent.Touched:Connect(function(otherPart) if otherPart.Parent:FindFirstChildWhichIsA("Humanoid") then local newPart = Instance.new("Part") newPart.Parent = game.Workspace end end) </pre>
0
Unable to cast Raycast Result to Ray?
81388121
Nuqz
0
2022-06-23 10:11:10
<pre class='brush: lua'>local player = game:GetService("Players").LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local cloudsFolder = workspace:WaitForChild("clouds") local head = character:WaitForChild("Head") local leftFoot = characte...
130479
0
Cloning from lighting and setting parent?
16826035
YellowoTide
1989
2014-05-20 22:53:50
<pre class='brush: lua'>clicked = 0 script.Parent.MouseButton1Click:connect(function() player = script.Parent.Parent.Parent.Parent.Parent if clicked == 0 then if not player:FindFirstChild("Car") then car = Instance.new("Model", Workspace) car.Parent = player car.Name ...
5198
3
7014
0
32061655
Mr1Vgy
30
2014-05-21 03:49:36
<p>Um I'm not sure why you're using the InsertService if you want to clone something from the lighting but what I usually do is:</p> <pre class='brush: lua'>local car = game.Lighting.Car:Clone() car.Parent = game.Workspace </pre>
0
Studio is not running my script, however there are no errors in the output?
304673699
toastre
0
2018-11-26 20:51:04
<p>Hello, So I am attempting to create a teleport script to use as an elevator in one of the games I am working on, however my script is not running. It's a localscript in a part to test as a button (regular script was doing the same thing, however giving me an error saying that "player" was a nil value while it was a ...
71199
0
Where is damage script located in FE gun kit viewmodel?
1173028351
RazorXX2
12
2021-07-21 07:17:02
<p>I specifically want to edit the damage when it hits a specific part of the body. I tried searching in the scripts but I found no leads. I also tried searching but nobody else asked.</p>
125562
1
I don't think I understood the meaning of returning?
467337150
XDvvvDX
186
2020-04-09 10:06:43
<p>Hey. I learned returning when I was a starter, and it's all fine. But lately I feel I do not know the meaning of returning and what it does so well. I use it rarely, and I use a lot of functions in my scripts. I feel maybe I got the wrong knowledge from a wrong website, or whatever. Can someone tell me what they are...
98601
0
My NPC's animation is not playing correctly. Help?
379782887
Shounak123
160
2020-09-13 10:56:56
<p>So, I created an NPC named Dawn, and used a viewportframe to render it to GUIs. Dawn is and R15 model, and is child of the viewportframe. I set a script under "Dawn" and written the following:</p> <pre class='brush: lua'>local animation = script.Parent.Humanoid:LoadAnimation(script.Parent.Female_Run) animation:Play(...
113114
1
whats wrong with my moving script? ~solved~
37735834
bubbaman73
143
2014-05-18 03:53:46
<p>im trying to make a part that goes to one side then moves back to where it came from and stops there, heres my script. ~~~~~~~~~~~~~~~~~ --Made by bubbaman73!</p> <p>p=game.Workspace.Part</p> <p>for i=150,1, -1 do p.CFrame=CFrame.new(i,0.9,0) wait() end</p> <p>wait(1)</p> <p>p=game.Workspace.Part</p> <p>for i=150,1,...
5021
2
6792
1
1810473
hiccup111
231
2014-05-18 11:01:11
<pre class='brush: lua'>p=game.Workspace.Part -- You only need to define this Once. for i=1,150 do p.CFrame= p.CFrmae * CFrame.new(1,0,0) wait() end wait(1) for i=150,1, -1 do p.CFrame= p.CFrmae * CFrame.new(-1,0,0) wait() end </pre> <p>(line 4) This will take the current position of 'p', then push it...
0
[EMERGENCY] I can't assign a team to a player, what's wrong?
689433817
l7mf
2
2020-01-11 22:59:38
<p>why isnt this working? can u tell me precisely whats wrong</p> <pre class="brush: lua">local players, teams = game:GetService("Players"), game:GetService("Teams") players.PlayerAdded:Connect(function(player) if player:GetRankInGroup(5086504) == 199 then local team = game:getservice("teams")["Game Developer"] ...
92892
2
85929
0
141001401
Tyler090130
619
2020-01-11 23:14:41
<p>Do not tag your post as "EMERGENCY". Please read what the first comment said. There is absolutely no point in doing that at all. Since I'm nice, I went ahead and fixed your script.</p> <p><strong>Please accept this answer if this helped!</strong></p> <pre class="brush: lua">local players = game:GetService("Players"...
0
How to make a player and NPC play a animation when touching a brick?
103919802
TheBuliderMC
84
2020-04-09 04:23:41
<pre class='brush: lua'>local player = game.Players.LocalPlayer local HEAD = player.Character.Head local anim = player.Humanoid:LoadAnimation(HEAD.ShotByShotgun) local char = workspace.Them local humanoid = char.Humanoid local head = char.Head local G = humanoid:LoadAnimation(head.Die) function onTouched(hit) G:Play() ...
98579
0
How can I make my GUI not shrink too much and look stretched when using grid alignment?
1649347748
TestUser4646
6
2020-07-31 22:16:44
<p>I am using a uigridconstraint in my UI and everything gets scaled correctly except for everything under that constraint. Why is this so and how can I fix this? It doesn't scale well on mobile but fine everywhere else.....</p>
110415
0
Most Custom Decal Morph GUIs broken now. Fix?
14837864
MrWarioman64
0
2018-07-27 15:33:42
<p>A couple days ago, seemingly any custom decal morph GUI that worked were broken by an update. They still appear to work client-side, but any other player will not see one's decal, or even see their avatar turn invisible. A fix is possible, as places such as Universal RP had their scripts updated immediately. However...
63865
2
What is a good way to keep a localscript running after a player leaves?
4330521
whyOmustOitObeOme
7
2015-04-08 23:46:17
<p>Hi. I have a localscript inside a surface gui that is activated when a player presses a text button. The script then constructs a tower over a period of time, maybe around 30 seconds. The problem is that when the player leaves the server while the tower is being built, the script stops running and it leaves the towe...
16512
1
19834
1
55088775
NotsoPenguin
705
2015-04-08 23:51:39
<p>You could fire a <code>RemoteEvent</code> that is located on the server.</p> <pre class='brush: lua'>local Event = ???? script.Parent.MouseButton1Down:connect(function() Event:FireServer(Arg1,Arg2) end) </pre> <p>Server Script:</p> <pre class='brush: lua'>local Event = ???? function Event.OnServerEvent(Player,A...
0
Why does my GUI text not change to the intermission time?
34716028
cmgtotalyawesome
1333
2017-12-23 21:09:47
<p>I tried to make a minigame intermission script but it isn't working, my script is down below.</p> <pre class='brush: lua'><br /> --// Variables local MapStorage = workspace.MapStorage local IntermissionTime = 15 local Players = game.Players:GetChildren() local Status = game.ReplicatedStorage.StatusValue.Value local ...
50810
1
50625
0
149258954
RayCurse
1513
2017-12-23 21:17:19
<p>First of all, your status variable needs to be the instance of the <code>StringValue</code> itself and not the value because you need to change the value later on. Second, you should add a <code>wait()</code> around line thirteen where the script is counting down the intermission. Third, your script needs a way to b...
0
How do I make currency decrease without making it go into negatives?
444613248
BloomFlame1
2
2023-01-15 18:52:51
<p>So I am developing a Roblox game that relies on purchasing cosmetics and other items. To get the currency for these items, there's classes in the game that you can attend and play mini games to get money. The starter amount of money you have when you first join the game is $50. So scripting the actual getting the mo...
132849
3
119994
0
559514967
T3_MasterGamer
1701
2023-01-16 13:08:24
<p>Combining <a target="_blank" href="https://scriptinghelpers.org/user/JP_Pontes">@JP_Pontes</a> and <a target="_blank" href="https://scriptinghelpers.org/user/CocoDysphoria">@CocoDysphoria</a>'s answers, the final script should look like this:</p> <pre class='brush: lua'>local Players = game:GetService("Players") loc...
0
LocalScript that checks if a player has this badge doesn't work? [CLOSED]
502210849
krLuCiEzkr
22
2023-03-30 18:53:16
<p>im making a local script that checks if a player has this badge, it does something to a text button if so</p> <p>this, is the script:</p> <pre class='brush: lua'>local BadgeService = game:GetService("BadgeService") local Players = game:GetService("Players") local badgeId = 2143097943 local function onPlayerAdded(pla...
133254
1
120293
0
2044258372
MaleficentMaestro
109
2023-03-30 19:29:01
<p>You shouldn't use a LocalScript when dealing with a PlayerAdded function.</p> <p>Here's a simple fix.</p> <pre class='brush: lua'>local BadgeService = game:GetService("BadgeService") local badgeId = 2143097943 game.Players.PlayerAdded:Connect(function(plr) local success, hasBadge = pcall(BadgeService.UserHasBadg...
0
Can Humanoid.Health go to a negative value?
1565853299
KneeDeepInTheDoot
4
2020-12-02 15:34:59
<p>I'm asking this question because I want to re-create DooM's gibbing engine. DooM's gibbing engine works when there is a negative health value of the monster's health. So, basically, if the health goes to -100, the player gibs. I just want to know if the Humanoid.Health value can go to negative values.</p>
116652
0
My rotation script based on humanoid root part doesn't seem to work?
530853592
Boomboyag
14
2020-09-16 16:00:23
<p>I've been trying to make a motion detector and so far it's gone pretty well. I've recently been working on rotating the part to match the player's rootpart direction, but I just can't seem to get the script to work. The only thing the output says is <strong><em>"Workspace.player.Tool.Handle.Part.SurfaceGui.Backgroun...
113228
1
Local script playing sound for everyone in the server?
98383385
hellmet1
42
2022-10-03 13:50:53
<p>So, i made a localscript that plays a sound after touching a part, but it plays the sound for everyone, and i made a local script just because i wanted it to do that. Here's the script:</p> <pre class="brush: lua">local part = game.Workspace.elevatorsong part.Touched:Connect(function(hit) if not hit.Parent:FindF...
131792
2
119045
1
1024248310
MarcTheRubixQb
153
2022-10-03 20:55:17
<p>Ok LAST post because I know this works. I know this works because I tested it with my brother in the game.</p> <p>The local script should be in StarterPlayerScripts. The sound should be in PlayerGui. And the part should be in workspace.</p> <pre class="brush: lua">local part = game.Workspace.elevatorsongpart local s...
0
I am trying to make a random colored head but it doesn't work?
1533246993
CountOnMeBro
51
2021-05-20 00:14:20
<p>I'm trying to make it so when the user joins, they will have a random colored head. Here's my script</p> <pre class='brush: lua'>local Player = game:GetService("Players") Player.PlayerAdded:Connect(function(player) player.Character.Head.BrickColor = BrickColor.Random() end) </pre>
123608
2
112700
1
80502300
OfficerBrah
494
2021-05-20 00:23:23
<p>There is a typo on line 3, do this instead:</p> <pre class='brush: lua'>player.Character.Head.BrickColor = BrickColor.random() </pre> <p>remember that function calls are case-sensitive</p> <p>edit: you should also do this every time the player's character is added because as it stands it will do one of two things:</...
0
How do I make a gui correspond with a keyboard key?
43418569
platinumninja7
0
2014-07-18 18:10:16
<p>How do I make a gui button for a key on a keyboard? Ex: A gui that is also a shift key</p>
8321
1
10782
0
16510016
SanityMan
239
2014-07-18 18:25:56
<p>If you are using a local script, you can use GetMouse on the LocalPlayer, and have a Key event. I prefer the KeyUp event, which triggers after a key is released:</p> <pre class='brush: lua'>--IN A LOCAL SCRIPT game.Players.LocalPlayer:GetMouse().KeyUp:connect(function(key) if key == "q" then --or whichever key ...
0
Script not changing parents transparency?
137853609
Sadwowow21
57
2020-02-18 16:05:40
<p>I was messing around with a script, and I was trying to randomly change the transparency of a part but it isn't working. Here is the code:</p> <pre class='brush: lua'>while true do script.Parent.Transparency = math.random(-0.5, 0.5) wait(1) end </pre>
94789
1
87538
2
34716028
cmgtotalyawesome
1333
2020-02-18 16:12:15
<p>You're problem is that Transparency can not be a negative number. Change your math.random() to math.random(0, 1). 0 means that the part is completely opaque while 1 would be invisible. Also, do not listen to GeneratedScript with the while wait(1) do, it is seen as bad practice and what you have now is considered bet...
0
Car value not disconnecting?
102254161
squidiskool
200
2021-02-22 02:54:16
<p>I'm trying to make a remote control car tool, it's supposed to do that when you unequip the tool, the car objectvalue is set to nil (nothing) and the "RemoteControlConnected" value in the car is supposed to be false. But for some reason, nothing happens. The "RemoteControlConnected" is not set to false and the Objec...
120496
1
109886
1
111523961
Azure_Kite
855
2021-02-22 13:42:07
<p>script.Parent.VehConnected.Value will give you a value not an object</p> <p>so</p> <pre class='brush: lua'>local value = script.Parent.VehConnected.Value </pre> <p>Will actually set whatever Value is in VehConnected to the variable value, not the object itself</p> <p>You might want to type</p> <pre class='brush: lua...
0
where would i put exacution wait time?
391170608
superspeedr1234
60
2020-06-05 19:23:49
<p>please tell me if either my wait is to low or if i need to add another! thx</p> <pre class='brush: lua'>local rightval = workspace.Part.value1.Value local leftval = workspace.Part.Value2.Value local father = script.Parent local pos = father.Position while true do if pos == Vector3.new(rightval) then do r...
105456
0
[Answered] Is it possible to make water two diffrent colors?
511409657
dinozaver_triceratop
78
2019-05-18 08:52:06
<p>[Answered] I just want to know if it is possible to make water two diffrent colors. Like if your standing in cold zone water color is diffrent then in normal zone. Thank you in advance.</p> <p>Edit: Can it be done in roblox studio or it needs to be done by script. And if it needs to be done by a script can you tell ...
80392
0
How do I make it so every second, your jump power increases?
813441209
dannybuns03
11
2022-12-13 02:36:43
<p>If you could help that would be amazing!</p>
132552
1
119687
1
245864252
xInfinityBear
1777
2022-12-13 10:25:39
<p>Use a while loop with a <code>wait()</code> of 1 second, and with each iteration, increase the jump power of the Humanoid.</p> <pre class="brush: lua">local Player = game.Players.LocalPlayer local Character = Player.Character or Player.CharacterAdded:Wait() local Humanoid = Character:WaitForChild("Humanoid") while t...
0
Can exploiters take advantage of this script?
10744384
xboxking2000
0
2021-01-13 23:27:35
<p>I asked this question yesterday but never received a solution so I am going to ask again. I am really new to scripting and I am making a speed run game that will start the player's timer on their GUI when they touch a Part. The timer is saved as a leaderstat and I am using remote events to add to the timer. The touc...
118658
0
its possible to save a stats not of a player, but of the server?
71527059
darkzerobits
92
2017-12-24 21:13:20
<p>its possible to save a stats not of a player, but of the server?, like "population : 25" and when open the server will be this value?</p>
50869
1
How to extend function wait() if called twice or more?
331809274
TechModel
118
2021-09-11 07:22:10
<p>I've been searching on the internet and I get unrelated stuff so I want clear answers hopefully. The problem is if the remote event was triggered twice, how would I reset the "wait(5)" again so until it the remote stops being called. Then it counts down to 5 until it ends.</p> <pre class='brush: lua'>game.Replicated...
127362
0
Can you connect roblox to a websocket?
94802373
fireboltofdeathalt
118
2017-06-05 07:43:12
<p>Would it be possible to connect to a websocket with roblox? I don't need directly, like say GetAsync my website with the javascript websocket, but it doesn't keep the connection. If you wanna know what I'm using this for it is a "Roblox hosted discord bot" I've already got a working version and it does what I need i...
43646
0
I want people to have a random colored body but it doesn't work?
1533246993
CountOnMeBro
36
2021-05-20 20:22:30
<p>I am trying to make it so your torso, legs, arms, and everything is randomly colored but it isn't working</p> <pre class='brush: lua'>local RGB = Color3.new(math.random(0, 255), math.random(0, 255), math.random(0, 255)) local Player = game:GetService("Players") Player.PlayerAdded:Connect(function(player) player....
123629
0
What order should I learn Lua in?
24031098
ImmenseKassing
120
2014-02-18 17:30:24
<p>I've already learned most of the basics of Lua, but I don't really know what order I should learn the lessons in. Because if you try taking this lesson before you took another one, you'll have no idea what's going on. And it gets confusing and it can take a really long time to learn stuff.</p> <p>None of the lessons...
63