question_score
stringclasses
21 values
title
stringlengths
6
119
question_userid
stringlengths
4
10
question_user
stringlengths
3
20
question_user_score
stringclasses
496 values
question_datetime
stringdate
2014-02-01 23:57:31
2023-04-02 01:40:15
question
stringlengths
0
11k
question_id
stringlengths
1
6
answer_count
stringclasses
8 values
answer_id
stringlengths
0
6
answer_score
stringclasses
18 values
answer_userid
stringclasses
946 values
answer_user
stringclasses
963 values
answer_user_score
stringclasses
692 values
answer_datetime
stringlengths
0
19
answer
stringlengths
0
10.7k
1
How do i teleport a table of players?
1624504218
GameBuilderLol
58
2021-06-16 10:37:27
<p>i have this script that creates a timer when one or more players enter the lobby, once the timer is finished it will teleport the players to a game, but i want it to teleport all the players to the same server, and it seems like it teleports each player to a separate server instead.</p> <pre class="brush: lua">while...
124454
2
113441
3
129265755
Vinceberget
1420
2021-06-16 10:55:37
<p>You can use the <code>TeleportAsync</code> function instead, which is like the <code>Teleport</code> function but with the support for multiple players, with the player(s) argument being a table, instead of an object.</p> <p>It's also a yielding function which means that it pauses the thread until it finishes execut...
1
Percentage-based Probability Selection?
2182958
Dummiez
360
2014-05-08 20:32:24
<p>How would you go about doing this in lua? To make it simple, this is an example of a random player selection.</p> <pre class='brush: lua'>local p = game.Players:GetPlayers() local rnd = math.random(1,#p) print (p[rnd].Name) </pre> <p>How can I make a percentage based for each player but as an array? For example, Dav...
4530
1
6317
1
386992
BlueTaslem
18044
2014-05-11 03:47:55
<p><code>math.random()</code> (with no parameters) generates any number in the range [0,1).</p> <p>To select among weighted events, you compute a random value from 0 to the sum of the weights:</p> <pre class='brush: lua'>local totalweight = 0; for _, v in ipairs(percent) do totalweight = totalweight + v; end local ...
0
Scaling meshes to player sizes?
81102736
NotoriousCrimson
0
2021-09-14 09:29:17
<p>Back again with another question, my friends just began to model 3D clothing and we have run into a problem, because in my game we use morphs to equip whats on the moroph to the player the clothes that are scaled on the morph aren't always scaled to the player size, is there a way to check for player size and scale ...
127434
0
how do i make a clone of a part from replicated storage to workspace in a certain position?
1730453659
CHUNKYALIEN342
0
2021-09-14 05:20:36
<p>I'm a beginner and i don't really understand some of the other script things but I tried making my own script so that I could learn but it didn't work :(</p> <p>my script:</p> <p>local click = script.Parent local button = script.Parent local block = game.ReplicatedStorage.test</p> <p>click.MouseClick:Connect(functio...
127433
0
How would I go about rotating the player depending on the mouse position?
84197866
plooring
55
2022-05-06 20:31:28
<p>I want to rotate the players entire body to face the mouse only on the X-axis, sort of the effect that the game <a target="_blank" href="https:///www.roblox.com/games/3221241066/DEADZONE-CLASSIC">"Deadzone"</a> has whenever the player moves their mouse. I've already tried ways to no avail, so I decided to ask for he...
129931
1
Doesn't remove the label when health changes?
331809274
TechModel
118
2021-08-15 10:19:17
<p>I'm trying to make it so on line 9 the "HealthChanged" makes it return and keeps the duration of the text for 3 everytime i hit the humanoid, but it doesn't instead of that, it says visible forever.</p> <pre class='brush: lua'>function Track(Humanoid) local Last = Humanoid.Health local function HealthChanged...
126489
0
Animation Cycle keeps looping first animation?
1674805834
Black_Magic2533
104
2023-01-12 18:40:53
<p>Im trying to make a sword tool with an animation cycle so on the first hit it will play an animation, then on the second hit a different, so on, and so forth. But for some reason whenever you click just once it keeps looping the first animation over and over and doesnt stop. The script is a local script inside of th...
132817
0
Custom mouse id works in roblox studio but not in game. why?
1380041932
Boyuanbogosess
17
2023-01-16 02:20:45
<p>So I have a gun that when u equip it u have a custom cursor but the problem is that it works in roblox studio but not in game.</p> <p>code:</p> <pre class='brush: lua'>pistol.Equipped:Connect(function() local reloadButton = ContextActionService:BindAction("ReloadButton", reloadMobile, true, "") ContextAction...
132861
0
Sending Messages From Discord To Roblox?
1554573538
kidsteve923
139
2021-07-05 15:29:14
<p>This Is A Tricky One So It Would Be Better If Pros Do It So I Want To Make A Game In Which Players From Discord Can Talk To Roblox Players I Have Already made Roblox To Discord But Not Discord To Roblox So Can Anyone Help Me? And Please Dont Send Me A Link To Dev Forum I Know He Did Do It But Its Out Dated Now So Th...
125081
0
Can i localize a function?
586997594
YandH015
9
2021-01-13 18:10:26
<p>Can i localize a function? like this:</p> <pre class='brush: lua'>function SpawnShadow() local Shadow = Instance.new("Part", workspace) Shadow.Position = vector3.new(10,10,10) Shadow.Name = "Shadow" local Shadow = SpawnShadow() </pre> <p>Can i do that?If not is there another way? because it does not know what shadow...
118646
1
108528
0
158811
TGazza
558
2021-01-13 18:26:03
<p>try this:</p> <pre class='brush: lua'>function SpawnShadow() local Shadow = Instance.new("Part", workspace) Shadow.Position = vector3.new(10,10,10) Shadow.Name = "Shadow" end -- need an end to your function! -- not needed. this is only done this way if you're going to call your function from multiple pla...
0
Tweening a part CFrame doesn't seem to work properly? [SOLVED!]
53928515
thaylerfg
30
2021-02-26 01:03:39
<p>I started a project with a friend and I'm having trouble tweening CFrame's in a skill. The idea is for the stick to grow straight in the hand of the charater, using tweening I managed to make it grow, but resizing the Z axis makes it grow both ways so to compensate I wanted to move the stick forward like this creati...
120690
0
21:23:34.839 - HttpError: DnsResolve, problem with PostAsync JSONECODE?
171340748
maxpax2009
340
2020-05-03 19:25:56
<p>I tried learning about HTTPSERVICE and learned about postasync but then i got this error; 21:23:34.839 - HttpError: DnsResolve</p> <p>Here's the script:</p> <pre class="brush: lua">local http = game:GetService("HttpService") local url = "http://www.somedomain/Home" local Data = { ["Awesome"] = "maxpax2009", ...
101762
1
How can I make a camera spin around a Character 360&deg;?
3289648
YaYaBinks3
110
2014-04-26 17:12:17
<p>Hello everyone, currently I'm trying to make a Camera spin around a Character 360°. However, I do not know how. I've currently had a try using this script:</p> <pre class='brush: lua'>ang = 0 while true do wait(0.1) local cam = game.Workspace.CurrentCamera cam.CameraSubject = game.Players.LocalPlayer.Cha...
3607
0
what is numbervalue intvalue boolvalue toolvalue and more values?
800926308
luxkatana
41
2021-04-08 13:07:52
<p>so i learned from thedevking a tutorial to make leaderstats</p> <p>but the only problem is what are these values?</p> <p>numbervalue intvalue boolvalue toolvalue what are they?</p>
122143
0
Why is the script only being disabled in the client and not the server?
163641015
AbsurdAwesome101
23
2020-11-22 15:51:57
<p>So I'm making a ban hammer that actually bans the player (not really, it's just a kick with a silly message and some creepy music plays inside their head so only they can hear it) but that's not the issue. So I wanted the player to be able to toggle kicking others or not. So, when the player equips the hammer, there...
116159
0
What's the difference between StudsOffset and StudsOffsetWorldSpace?
78079406
ScuffedAI
435
2019-09-14 11:28:23
<p>These properties are apart of BillboardGui. From what I can tell, they both seem to do the same thing.</p>
87425
0
Why is the LuaHeap value constantly going up in Dev Console/Client Memory/Place Memory?
223838284
vector3_zero
1056
2018-04-15 15:26:15
<p>I noticed this today and thought I had an issue with the game I am making, but even when I create a new place in studio with just a baseplate, if I launch the game through the roblox website and open the dev console, Client Memory/Place Memory/LuaHeap is rising constantly, at a rate of about 2.3 (meg?) every 10 minu...
56880
0
CFrame: How to weld objects to player in a certain direction?
310696583
LeHelary
87
2019-09-09 11:42:04
<p>I have a model which needs to be welded to the player's left arm, and I want it to face the front of it.</p> <p>This was the old script, but it only worked if the player doesn't move after spawning. If the player turns before the object is welded, the object will not be placed facing the front of the arm.</p> <pre c...
87239
3
How do I use the BodyObjects effectively?
49776603
TomsGames
225
2014-02-19 21:39:20
<p>Alright so I have a model car, which 'body' objects am I required to use to get the thing moving?</p> <p>It needs to move forward constantly and swerve side to side as buttons are pushed accordingly, does that mean it needs an angularbodyvelocity thing?</p> <p>Also do 'body' objects even work for whole models?</p> <...
128
1
249
1
13416513
Merely
2122
2014-02-19 21:45:40
<p>BodyAngularVelocity tries to make the object spin.</p> <p>What you want is a BodyGyro to control the direction the car is facing, and a BodyVelocity or BodyForce to push the car in that direction.</p> <p>The wiki does a good job of explaining each Body object and how to use it: <a target="_blank" href="http://wiki.r...
0
What is the difference between &quot;Else&quot; and &quot;Else If?&quot;
490487562
SheepeySheeps
4
2020-06-29 23:37:30
<p>I'm not sure what the difference is, can someone explain?</p>
107795
0
How can I make it so that the repeat stops after C has stopped being held?
102782207
JadensLua
12
2020-06-20 08:19:07
<p>I've tried by having the repeat loop stop when the C input has ended or when its done being held</p> <p>local UIS = game:GetService(UserInputService)</p> <p>UIS.InputBegan:Connect(function(input, gameProcessed) if(not gameProcessed) then if(input.KeyCode == Enum.KeyCode.C) then repeat wait(0.3) print('pansy potato')...
106893
0
Has the Instance &quot;Message&quot; been removed from Roblox?
27806595
KenzaXI
166
2018-03-19 17:52:23
<p>Hi, I haven't opened studio in over an year and just has the urge on doing some code :P I decided to check to see what I remember by starting with the basics, creating a message. Unfortunately I cannot find the Instance anywhere, which leads me to this Question, Has it been removed completely or has the name been ch...
55316
0
Why does tick() return the player?
1179331769
Cooldoodle2019
4
2023-02-16 18:35:30
<p>im making a ping displayer thingy and for some reason i enter tick and it returns the player</p> <p>localscript (yes it is inside of <strong>startergui</strong>)</p> <pre class="brush: lua">while true do local ping = game:GetService("ReplicatedStorage").Remotes.getPing:InvokeServer(tick()) script.Parent.Text...
133080
0
how to turn off roblox chat filter in your game? please ask i am not doing this for bad purposes?
414176706
TheUltimateTNTFriend
109
2020-08-10 11:02:36
<p>i have searched everywhere in the web and there is no answer to this question.. I know the risks of turning off filter but i just wanna learn how would u turn off filter anyway i mean is there a way? I wont obviously use this on my games my game will get moderated but i just wondering So please explain if there is a...
111100
0
How to damage multiple people?
84106068
monsterdanger16
4
2021-07-22 03:13:07
<p>I know its due to Debounce but if I remove Debounce it damages players multiple times. How to fix?</p> <p>here code:</p> <pre class='brush: lua'>local remote = game.ReplicatedStorage.BarrierBeam local Debounce = false remote.OnServerEvent:Connect(function(plr,mouseaim) local parts = game.ServerStorage.Classes.Ba...
125576
1
114268
0
25483747
phxntxsmic
487
2021-07-22 03:47:18
<p>You can use a table (<a target="_blank" href="https://education.roblox.com/en-us/resources/intro-to-dictionaries---series">dictionary</a>) and index the table with the player's name or user id:</p> <pre class='brush: lua'>local remote = game.ReplicatedStorage.BarrierBeam local Debounce = {} -- table remote.OnServerE...
0
Is it possible to spawn a meshpart using scripts?
359590587
Sorukan
239
2018-12-06 01:53:36
<p>So i found a mesh of a circle that i can use to change it's scale through scripting but i can't seem to spawn the meshpart the way you would normally spawn a part.</p> <pre class='brush: lua'><br /> local mesh = Instance.new("MeshPart") mesh.MeshId = "rbxassetid://2425219842" mesh.Transparency = 0.5 m...
71743
1
68059
1
113896557
metryy
306
2018-12-06 02:02:06
<p>It's impossible to set a MeshPart's MeshId via a script due to the collision model of the mesh not being able to be recomputed during run-time.</p> <p>One alternative though is something called a SpecialMesh. SpecialMeshes allow for developers to provide a standard template or user uploaded meshes to a BasePart.</p>...
6
[Not Question] Need Some Usefull Plugin?
528894344
The_Saver31
260
2021-03-10 06:30:30
<p><strong>Plugin</strong></p> <p>Plugin is the main object responsible for creating basic studio widgets. It is a custom add-on to Studio which adds new behavior and features that are not normally included.</p> <p>Link: <a target="_blank" href="http://">https://developer.roblox.com/en-us/articles/Intro-to-Plugins</a><...
121141
0
how do you make a highlight for the tagger in bomb tag? and make it change when your tagged?
518263070
hudstir
0
2023-03-21 14:42:29
<p>im not sure how to do this, and im not sure where to add it. help?</p> <pre class='brush: lua'>local dss = game:GetService("DataStoreService") local ds = dss:GetDataStore("DATA STORES") local taggerh = game.ReplicatedStorage.BombTagReplicatedStorage.Highlights.TaggerH function saveData(plr) if not plr:FindFirstC...
133222
0
How can the part clone with a specific Y and X axis?
1592957904
ashdgg_acfdf
2
2022-11-20 20:15:32
<p>So when I clone the part out of the serverstorage it clones like layed down and I want it like straight but when I try to change the parts Y and X axis it doesnt work, since my knowlege of scripting is not that big I dont really know what to do</p> <p>local OnePunch = game.ServerStorage.OnePunch game.ReplicatedStora...
132325
1
119516
0
123585026
NykoVania
198
2022-11-20 23:13:29
<p>Use CFrame.Angles to change the rotation, do this along with your current code on line 3 like this</p> <pre class='brush: lua'>newPunch.CFrame = character.HumanoidRootPart.CFrame * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)) </pre>
0
How to find LocalPlayer from a part that touches a part?
68164751
Pixelated_Dreams
0
2022-07-29 17:22:51
<p>I'll try to explain best I can.</p> <p>I'm using .Touched to know when a part touches a part, and that works fine. But I want it to only fire for the LocalPlayer. It currently fires for everyone in the server.</p> <p>Current local script:</p> <pre class='brush: lua'>local Part = game.Workspace.finish Part.Touched:Co...
130997
0
How can you make a door opening script script into a local script?
343953587
ssieej
0
2021-09-19 22:11:46
<p>Here is the script that I am trying to change</p> <p>function onClicked()</p> <pre class="brush: lua">script.Parent.Parent.Door.Transparency = 1 script.Parent.Parent.Door.CanCollide = false </pre> <p>end script.Parent.ClickDetector.MouseClick:connect(onClicked)</p>
127564
0
Why do ShirtTemplate changes only work ServerSide?
64408300
RaverKiller
668
2014-03-10 21:47:54
<p>If I were to change the ShirtTemplate property of a shirt in a LocalScript (Client side), it would only change for the client, how could I make it change so every player sees the LocalPlayer wearing the updated Shirt?</p>
615
0
The process cannot access the file because it is being used by another process?
55001858
lmpct
0
2020-08-01 07:25:02
<p>My Roblox Player works perfectly fine there are no issues until now. When I was editing our group game a few hours ago it was functioning well. I reopened the Roblox Studio application and it was installing again for some reason and resulted in an error system. I tried to do distinct ways to fix it such as reinstall...
110444
3
Is there any good tutorials or advice someone could give for a starter like me?
161952911
Hansoloisgud
17
2020-06-02 16:51:23
<p>I recently got into scripting and wanted to know if anyone had some good advice or tutorials to help me start off. I don't really know any youtubers who do scripting videos so some tutorials would be nice.</p>
105127
4
96922
1
53949567
whosbossme
27
2020-06-02 17:01:21
<p>Regarding youtube, AlvinBlox and peasfactory have been an excellent help in learning.</p> <p>As far as advice goes, don't get burnt out. That's something I struggle with a lot. I'll feel some great inspiration to work on a project, and I'll slave over the computer for hours and hours and sometimes <em>days</em>, onl...
0
Whats the difference between repeat until and while do?
984384728
RebornedSnoop
165
2020-04-26 02:53:22
<pre class='brush: lua'>While "condition" do SCRIPT end Repeat SCRIPT Until "condition" </pre> <p>Isnt the both of them the same they just have to match a condition and keep looping until it matches it. Could anybody tell me the difference? Please help,</p>
100755
3
93022
1
556361351
asdfghjk9019
227
2020-04-26 03:05:32
<p>in <code>While do</code> if the condition is true it will do it while the condition is true<br /> with <code>until</code> it works a bit different it will do the script until the condition is true</p> <p>Example: <strong>With reapet</strong></p> <pre class='brush: lua'>Local player = game.Player.LocalPlayer Local Ch...
1
How to encrypt my code and or obfuscate it? SOLVED
45364992
ErtyPL
60
2019-08-26 14:30:43
<p>At first, I'm really sorry if this question is against guidelines and wrote with no elementary code. Question: I want to learn how to encrypt my code and or obfuscate it.</p> <p>What ways are to make simple encryption of an example code</p> <pre class='brush: lua'>function onPlayerRespawned(newPlayer) local pl =...
86540
2
80193
1
2479393
Dfzoz
345
2019-08-26 15:09:54
<p>I dont know about the obfuscator, but if you want a function that happens on players that spawn you should usePlayerAdded and CharacterAdded:</p> <pre class='brush: lua'>function onPlayerRespawned(newCharacter) newCharacter.Humanoid.WalkSpeed=78 end function onPlayerEntered(newPlayer) if newPlayer.Character then onP...
0
Why doesn't my data save everytime? And why does it only work inGame and not in Studio?
429721857
iCoconutt
51
2020-04-30 20:50:49
<pre class='brush: lua'>players.PlayerRemoving:Connect(function(plr) local success, errormessage = pcall(function() playerData:SetAsync(plr.UserId.."-rep", plr.leaderstats.Reputation.Value) end) if success then print(plr.Name.. " successfully saved.") else print("There was an error savin...
101382
1
93634
4
25483747
phxntxsmic
2217
2020-04-30 21:13:58
<p>I have seen similar questions asked before.</p> <p>Typically, I tell people to use the <strong>BindToClose()</strong> method on <strong>game</strong>.</p> <pre class='brush: lua'>game:BindToClose(function() -- go through all players, saving their data local players = game:GetService("Players"):GetPlayers() ...
0
How would you add commas to integers?
662062317
ScaleisRed
58
2019-07-11 21:28:07
<p>I'm trying to add commas to integers, for example:</p> <pre class='brush: lua'>x = 5000 print(x) --&gt; 5000 </pre> <p>I want commas in between each three digits. So I want it to be:</p> <pre class='brush: lua'>--&gt; 5,000 </pre>
83488
2
77592
1
55174990
sO_Ov
275
2019-07-11 21:35:52
<pre class='brush: lua'>x = 5000 function commas(str) return #str % 3 == 0 and str:reverse():gsub("(%d%d%d)", "%1,"):reverse():sub(2) or str:reverse():gsub("(%d%d%d)", "%1,"):reverse() end -- you need convert the value to string (using tostring()) print(commas(tostring(x))) </pre>
0
How can I make a function work only once or just destroy itself?
140563842
NoReal229
21
2023-02-05 06:02:40
<p>So I have this script that moves sample model, but the thing is whenever I create another sample model, the previous one is still attached to the function so it looks like previous model is same as new model (I hope you understand)</p> <pre class='brush: lua'>events.SampleEvent.OnClientEvent:Connect(function(sampleM...
133020
1
120128
0
559514967
T3_MasterGamer
1749
2023-02-06 01:59:30
<p>You can use <a target="_blank" href="https://create.roblox.com/docs/reference/engine/datatypes/RBXScriptConnection#Disconnect"><code>RBXScriptConnection:Disconnect()</code></a> and connect it again.</p> <pre class='brush: lua'>local connections = {} events.SampleEvent.OnClientEvent:Connect(function(sampleModel) ...
1
How do I make door that only players with a specific gamepass can open?
540031286
JBennettChief9
165
2020-01-24 04:45:57
<p>I need to make a script so that when a door is touched and the player has the Game Pass, the door will open for a few seconds before closing! How can I do this?</p>
93493
0
Why does this script not create and explosion?
870454
Ristone3
0
2014-02-21 01:32:17
<pre class="brush: lua">function NuclearSequence() game.Lighting.Ambient = Color3.new(190,109,0) game.Lighting.OutdoorAmbient = Color3.new(190,109,0) game.Lighting.Brightness = 150 game.Lighting.FogEnd = 5 k = Instance.new("Explosion", game.Workspace) k.ExplosionType = "NoCraters" k.BlastRad...
186
2
A script of mine works in solo, but not online?
358230
gkku
10
2014-03-13 02:40:41
<p>Earlier today a friend of mine requested a few scripts, and I went ahead and made them because I've only started cracking down on learning Lua earlier this year and really needed the practice.</p> <p>One of these scripts was pretty simple - make a sound play when a part is touched. After a while I had whipped this u...
658
0
How do I fix a randomly crashing loop?
18929555
TurboFusion
1821
2015-02-23 00:58:21
<p>Ok, so I have a gun kit that has bullet trails, and the bullet trails sometimes cause the player using the gun to crash.</p> <p>Here's the loop that creates the bullet trails:</p> <pre class='brush: lua'>spawn(function() local LastPos2 = nil while true do if LastPos2 then if (not Bullet:I...
15232
0
This is my first time using datastores and I don't think I am doing it right?
355542977
blockydiamond01
0
2020-08-01 20:42:02
<p>I have been practicing a lot of programming and right now I am doing datastores. I don't know what I am doing wrong but it won't save.</p> <p>Here is my code:</p> <pre class='brush: lua'>local DSS = game:GetService("DataStoreService") local ScoreSave = DSS:GetDataStore("ScoreSave") game.Players.PlayerAdded:Connect(f...
110493
0
How do I check if a player is infront or behind a player?
1351827380
LonePioneer
2
2020-07-31 20:56:29
<p>https://prnt.sc/ts05x2</p> <p>I need to check if the player is infront or behind this NPC.</p>
110408
0
Making a custom event to detect mouse clicks?
20960275
GShocked
145
2020-08-01 03:37:20
<p>Firstly, I do not want to use the Mouse object, so MouseButton1Click is not an option. I want to use UserInputService, but my solution still seems unclean.</p> <p><strong>ModuleScript:</strong></p> <pre class='brush: lua'>function GuiModule.Click(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 o...
110439
0
How to make destroyable/shootable parts?
103312411
oo6j
0
2021-02-21 02:31:17
<p>Hello! I am a developer trying to make an SCP styled game and I was wondering how to do something. I want a system were the glass can be shot and destroyed, then respawns in like 30 seconds. It was a way for the CD to escape. I have no idea how to do this and was wondering if someone could help me? Maybe make a part...
120446
0
How to check when player is walking and stops walking?
26148956
lightpower26
399
2015-03-13 20:43:29
<p>I make guns on roblox whenever I feel like it. I decided to try to add something to them. A walking animation. I checked Venvious' Avert the Odds II game and I couldn't find anything that showed when the player is walking or not. But it still has a walking animation! I looked to see how to check if a player is walki...
15731
2
18873
0
13667373
EzraNehemiah_TF2
3552
2015-03-13 20:48:18
<p>To check if the player is walking or not, we need to see what speed its. An int value so basicly a number. When a player stops walking it returns 0. If it's higher than 0 then they're walking,</p> <pre class='brush: lua'>Player.Character.Humanoid.Running:connect(function(speed) --I hope player is a variable of an ac...
0
A* (A Star) Pathfinding not iterating?
23600185
coolepicjoshua
110
2018-05-06 01:50:21
<p>I am using A* pathfinding for an AI because the Roblox Pathfinding algorithm doesn't meet my needs, but it seems to keep looping through the starting part. It doesn't move on to any of the other parts in the open list, and parts that are ALREADY in the open list are simply re-added as if they are new parts. Any help...
58021
0
Is there a proper way to position manually welded hats?
806698
duckwit
1404
2014-05-05 13:49:37
<p>There are various reasons why the default ROBLOX hat system is untenable for my project, so I've resorted to welding them manually to the desired anatomical parts of my <code>Character</code> (I use a synthetic <code>Head</code> for animation purposes).</p> <p>I inserted all the <code>Hat</code>s that I wanted into ...
4378
0
How do I loop something until an event fires?
25484931
lucas4114
607
2016-11-14 00:21:38
<p>How can I keep repeating "plrpos = plrpos + Vector2.new(0.05, 0)" while the W key is down and then stop when the W key is up? I have this code, it works but how can I make it stop when W is up.</p> <pre class='brush: lua'>game:GetService("UserInputService").InputBegan:connect(function(input) if input.UserInputTy...
37195
1
39680
2
28420043
Anthony9960
210
2016-11-14 04:13:37
<p>I looked on the Roblox Wiki and I found the solution. I've tested this and it works.</p> <pre class='brush: lua'>game:GetService("UserInputService").InputBegan:connect(function(input) if input.UserInputType == Enum.UserInputType.Keyboard then if input.KeyCode == Enum.KeyCode.W then if input.U...
0
Tool Animation Playing when unequipped?
216815068
ShineBright2775
30
2020-06-20 00:20:32
<p>I have this idle animation equipped in a tool, which plays the idle when equipped, then if I press W stops and when I release W plays again. But when I am pressing W and unequip the tool at the same time the animation keeps playing. I've tried adding some stuff but nothing is working so I turned to this</p> <pre cla...
106873
0
My data works, but I want to be able to add new Values and save them aswell. How will I do this?
300319320
TheBeastMare
2
2020-10-18 15:18:22
<p>My script is</p> <pre class='brush: lua'>--// Services \\-- local players = game:GetService("Players"); local DataStoreService = game:GetService("DataStoreService"); --// Global Values \\-- PlayerData = {}; _G["Information"] = { Version = 1.03, ServerCreated = os.time(), }; _G["JackpotData"] = { JackpotT...
114523
0
Stopping health regen?
79674563
PredNova
130
2015-04-30 17:22:05
<p>I've been making a new health GUI. It works completely fine but how do I remove the script that's in the player to stop their health from regenerating as I'm going to make my own, I have found a previous question like this, But the script that was given doesn't seem to work...</p> <pre class='brush: lua'>game.Player...
17138
1
20529
1
1002773
Spongocardo
1991
2015-04-30 17:40:25
<p>The character is nil for a few seconds, that is why your script won't work. To solve this, you need to wait until the character is available using the CharacterAdded event's wait method.</p> <pre class='brush: lua'>game.Players.LocalPlayer.CharacterAdded:wait() game.Players.LocalPlayer.Character:WaitForChild("Health...
1
All my parts are collidable how can i fix this?
1722023006
OhBrotherGaminYT
11
2021-04-23 23:18:09
<p>So my parts suddenly become collidable all of a sudden, I uncheck the check the CanCollide check mark and nothing happens, please help, thanks.</p>
122724
0
Error in script function: Appears as endend?
105912796
Yuyoni
3
2017-05-15 21:40:47
<p>so i typed a simple function. the function i was using the function onclick() , but it appeared at the end function that instead of end it said "endend" anyone know why? Here's the script as it follows</p>
42955
0
How do I get a GUI to appear and disappear for everyone on the game?
47491950
AndresaBrasileira
12
2018-06-24 21:20:26
<p><strong>I want it when I press "q" the GUI appears or disappears for everyone.</strong></p> <pre class="brush: lua">function PressQ(key) if (key == "p") then if (Open == false) then gui.Enabled = true atv.Parent = gui Open = true elseif (Open == true) then ...
61079
0
How can I make it so a object can weld on to a player?
1292809675
AronIZOdd
12
2021-01-13 17:31:47
<p>Can someone help me figure out how to weld a object on to a player on clicked?</p>
118645
0
Countdown Gui with decimals, adding random 0s or 9s to the end. Whats wrong with it?
96490253
sean12345678900000
15
2021-02-21 19:58:04
<p>Hello, I have been making a count down with decimals but I run it seems to add 0s or 9s to the end. Depending if I use IntValue or NumberValue. Here is my code:</p> <pre class='brush: lua'>script.Parent.MID.Text = m..":"..s while true do if s &lt;= 0.00 then if m == 0 then break; ...
120475
0
How do I disable a characters controls (WASD and Space Bar)?
450355199
4d61736f6e
59
2017-12-08 05:16:32
<p>How would I disable the controls through scripts. Any help is appreciated :D</p>
50035
1
Getting current player count?
804066323
J_98482
18
2018-10-05 20:51:50
<p>I've tried a bunch of ideas to give my code an accurate player count, but so far, nothing has worked out. The piece of code that's gotten me closest looks something like this - 'val' being a number variable that stores the number of players. I've set it up so that it checks every .15 seconds.</p> <pre class='brush: ...
68459
0
How do i make it so the animation stops restarting?
319722439
soreno2468
25
2020-11-22 01:48:20
<pre class='brush: lua'>Humanoid.Running:connect(function(speed) if speed &gt;= 5 and speed &lt;= 17 then print("Running") walk:Play() else walk:Stop() print('stopped Running') end </pre> <p>so this is the script and whe...
116135
0
GUI closing Script?
29659145
VirtualFlying
55
2014-02-23 15:50:15
<p>I'm making a GUI Intro for all my games. I've created the GUI, and I've done this:</p> <pre class='brush: lua'>print("Close button loaded") button = script.Parent window = script.Parent.Parent.Parent.Parent function onClicked(GUI) window:remove() end script.Parent.MouseButton1Click:connect(onClicked) </pre> <p>B...
257
7
540
1
64408300
RaverKiller
668
2014-02-25 18:33:14
<pre class='brush: lua'>local Button = script.Parent -- TextButton local Window = script.Parent.Parent.Parent.Parent -- ScreenGui or Frame, whatever is being removed. Button.MouseButton1Click:connect(function() Window:Destroy() end) </pre> <p>Remember to use a TextButton and make sure you have the directory correct...
0
How do I make Premium Benefit Trails?
83126006
Fquarius
0
2020-11-22 19:01:17
<p>I've got two scripts and I want to mix them (Premium Benefit Trails), but I'm not sure how.</p> <p><strong>Trail Script</strong></p> <pre class='brush: lua'>game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(char) local trail = game.ServerStorage.Trail:Clone() ...
116165
0
How to disable health bar?
51237105
PyccknnXakep
1225
2014-12-18 20:53:55
<p>I've already made a custom health bar, but I can't find a way to disable the ROBLOX health bar. Any help please?</p>
13391
2
16443
0
7609229
Hibobb
40
2014-12-18 21:05:21
<pre class='brush: lua'>game.StarterGui:SetCoreGuiEnabled("Health",false) </pre>
0
I am trying to set jump power to 100 but I can't?
1533246993
CountOnMeBro
51
2021-04-20 21:43:43
<pre class='brush: lua'>local Player = game:GetService("Players") local human = 'Workspace:WaitForChild("Humanoid")' Player.PlayerAdded:Connect(function(player) player.Name.human.JumpPower = 100 end) </pre>
122612
2
111735
0
85721685
UAStudio
39
2021-04-20 21:48:04
<pre class='brush: lua'>game.Players.PlayerAdded:Connect(function(Player) Player.CharacterAdded:Connect(function(Character) Character.Humanoid.UseJumpPower = true Character.Humanoid.JumpPower = 300 end) end) </pre>
2
InsertService Question
31655670
Greatgreatgood5
55
2014-02-17 03:36:43
<p>Well, I know that you can do this:</p> <pre class="brush: lua">game:GetService("InsertService"):LoadAsset(--asset).Parent = Workspace </pre> <p>But, when I change the parent part to game.Players.Greatgreatgood5.Backpack, it always ends up as a model. Help?</p>
20
2
43
2
13416513
Merely
2122
2014-02-17 03:49:56
<p>When you call LoadAsset, all of the parts are grouped into a Model. This is because the asset might contain multiple instances.</p> <p>You can select the first object inside the model as follows:</p> <pre class="brush: lua">game:GetService("InsertService"):LoadAsset(assetId):GetChildren()[1].Parent = Workspace </pre...
1
How would I create Fall Damage in my game?
5206310
alibix123
175
2014-02-23 07:14:12
<p>How are game mechanics like fall damage implemented in roblox games?</p>
248
1
How would I go about making an invincible npc?
23286900
greyalt700
0
2016-07-05 17:44:54
<p>I have npcs that I do not want people to just kill when they aren't monsters</p>
32668
0
A new gradient isn't being chosen every time I open a gui?
1251627904
CodeWon
121
2021-05-04 20:48:11
<p>My script is supposed to chose a random gradient from a folder of ones that I made. The first time it choses a gradient but then it sticks with it the after the gui is opened again, why is this?</p> <p>This choses the gradient:</p> <pre class='brush: lua'>local gradClone function chooseGradient(player) local gra...
123096
0
[SOLVED]localscripts wont mute and unmute sound but will change text?
1546980603
Jakob_Cashy
67
2020-06-01 02:27:13
<p>This LocalScript is inside a ScreenGui: (1298214499 is the sound id)</p> <pre class='brush: lua'>local music = {"1298214499", "1298214499"} local sound = script.Parent.BGM local muted = false while true do for i = 1, #music do sound.SoundId = "rbxassetid://"..music[i] sound:Play() wait(so...
104984
0
Equipped Event &amp; Connect a function which will chat, help?
6964876
Lopous
1
2017-12-24 22:47:03
<p>This is probably the most easiest questien, but I am a derp and have no knowledge of lua or scripting (yet).</p> <p>Do anyone know how to this? Example I hold a sword (or any tool in general) and I press T and from my head it says like "T" (or any word).</p>
50875
1
50683
0
433844471
StoleYourClothes
105
2017-12-25 13:11:42
<p>Simply detects when the 'T' key on the keyboard has been pressed. This should give you a start, try testing this by inserting a LocalScript into StarterGui.</p> <pre class='brush: lua'>local UIS = game:GetService("UserInputService") -- grabs userinputservice UIS.InputBegan:connect(function(input, _) -- recognizes in...
1
How do you change the player properties if a BoolValue is true?
31197683
GingerBiscuit99
30
2014-04-17 13:43:31
<p>Hello, I am making this game and its main genre is Health care and so on. Here is what i have done so far:</p> <p>I made a model and named it "Sickness". It's parent is game (game.Sickness) and inside the Model there are 6 BoolValues. The name of the BoolValues are as shown below:</p> <p>BoolValue 1 - Frostbite, Boo...
2430
0
Error coming from valid line?
377679694
TheB4dComputer
100
2021-04-27 12:43:57
<p>I've been trying to make a script where where, every so often, a crystal will spawn in the bounds of the map. I have a <code>while wait()</code> loop in a script. The script is in ServerScriptService. The error is coming from the loop and says: "Requested Module is Required Recursively". My code:</p> <pre class='bru...
122860
2
111944
1
273093957
Rare_tendo
3000
2021-04-27 18:03:20
<p>The error is not coming from your code: it's pretty obvious that you aren't requiring any module script, let alone recursively requiring a module within the module itself. The error is most likely thrown by roblox's built-in building tools</p> <p>There is, however, an issue with your code, most likely unseen because...
0
What is parent and child? please respond
1199050770
0nlyJP
0
2021-02-21 15:34:53
<p>Hi! I'm new to scripting on ROBLOX and I've been hearing about something called parent and child. Would any of you be willing to explain to me what it is?</p>
120466
0
Is there e method to assign path to Character ?
506839197
Omerevkizel
31
2020-08-02 10:26:17
<pre class='brush: lua'>while script.Parent.Parent == game.Players.LocalPlayer.Character or script.Parent.Parent == game.Players.LocalPlayer.Backpack do if game.Workspace.Gamemode.Value == 0 then script.Parent:Destroy() end end </pre> <p>Omerevkizel.Character = nil what ?!?</p>
110533
0
ROBLOX: How do I Keybind Without Using Deprecated Events?
16754553
Minifig77
190
2015-07-01 04:05:51
<p><strong>For a project I'm doing, I need to make a sprint script that increases your walkspeed and widens your camera angle a little bit when you hold down shift.</strong> (For future reference, this is a LocalScript.) No problem--I've made one before. The issue arose when I felt like making a brand new one just beca...
19166
2
22783
1
13667373
EzraNehemiah_TF2
3552
2015-07-01 12:27:52
<p>Using Dyler3's idea, I'm going to make it way less complicated for you.</p> <pre class="brush: lua">local uis = game:GetService("UserInputService") --The service local plyr = game:GetService("Players").LocalPlayer uis.InputBegan:connect(function(Key, Processed) --Processed is so you don't sprint when you press Shift...
0
Please can some one help me with this it throws an error?
63867266
Scripter79
0
2015-02-03 10:13:14
<p>i am trying to make a door when touched it checks the players kills</p> <p>function GiveGui(Player) if Player.leaderstats.kills >= 1 then script.Parent.Transparency = 1 script.Parent.CanCollide = false wait (0.5) script.Parent.CanCollide = true script.Parent.Transparency =...
14714
0
i have problems with my gamepass script can somewho help ?
232063705
milian2008berlin
0
2021-06-07 08:04:47
<p>so there was first a problem with character addd or so i got that error gone with wait but then it still does not work tried doing 2000 health for clearer results and it was indeed not working and there are no errors so i dont know whats the problem it may be how i made the health part but otherwise i dont know</p> ...
124161
0
(SOLVED) Enemy Not Updating Position, Why?
165500987
allybally12345
40
2020-09-26 00:15:34
<p>Solved By <a target="_blank" href="https://scriptinghelpers.org/user/TGazza">This</a> Person.</p> <pre class="brush: lua">local UpdatePosition = 0.2 --How long it takes target the next humanoid local DamageTime = 3 --How long it takes for the enemy to attack again local Damage = 30 --How much damage the enemy does -...
113646
0
Attempt to compare instance to value?
561329525
Desmondo1
121
2022-04-23 01:04:43
<p>I'm trying to make a shop system but line 35 is giving me an error.</p> <pre class='brush: lua'>_G.ownedClasses = {} function AddMoves(moveList, player) local playerMovesFolder = player.Backpack.Moves local playerMoves = playerMovesFolder:GetChildren() for i, move in ipairs(playerMoves) do move:D...
129776
1
117297
2
1608691335
scripterhelper5354
854
2022-04-23 06:14:27
<pre class='brush: lua'>price.Value </pre>
0
Getting mouse hit position with User Input Service?
1797911134
coolboya_3
0
2020-08-01 18:53:42
<p>Hi, I'm trying to get the mouse hit position, but without using the :GetMouse() function. As far as I know, the only way to get the "mouse hit" with user input service is casting a ray, but it doesn't return a result when there is no result instance. Do any of you guys know how to get the mouse hit position (mouse.H...
110489
0
Touched event does not trigger the outcome. How to fix?
49566361
maxt2008
7
2020-10-20 08:10:04
<p>So I am trying to make it when you touch a certain part, it triggers and goes into the workspace, it opens a model and it goes to a decal and changes the transparency when it is touched by the players Humanoid.</p> <p>When I go to touch the part that activates the outcome, nothing happens.</p> <p>Here is the script:...
114608
0
Animals will not move in my game?
560375633
Shadow_12306
7
2022-07-30 13:36:27
<p>I have a roblox game I made a while ago called "Animal RP" and in it, you select an animal and a map and play with friends. However, the animals won't move anymore. Last time I checked which was a few months ago, this was not an issue. I don't know what to do or what the problem could be. It could possibly be someth...
131011
0
User input service not working suddenly?
321147068
iiFloxy
9
2022-11-18 04:03:16
<p>Script worked a few days ago. Suddenly doesn't work.</p> <pre class='brush: lua'>real = false script.Parent.Equipped:Connect(function() real = true end) script.Parent.Unequipped:Connect(function() real = false end) game:GetService("Players").PlayerAdded:Connect(function(player) player.CharacterA...
132307
0
Module code did not return exactly one value???
191289626
Gooncreeper
98
2020-08-01 21:59:18
<p>Here is module script:</p> <pre class='brush: lua'>CommandFunctions = {} function CommandFunctions.Speed(Player, Speed) Player.Character.Humanoid.Speed = Speed end function CommandFunctions.Health(Player, Health) Player.Character.Humanoid.MaxHealth = Health end function CommandFunctions.Heal(Player) Play...
110499
1
How do I perform a function when a dialog choice is selected?
22502080
lolkid007
43
2018-05-14 23:38:14
<p>I want a player who selects a dialog choice to be kicked once they select that choice, but I have no clue where to start. I've been searching online for a while but none of the codes seem to work.</p> <pre class='brush: lua'>local Dialog = script.Parent Dialog.DialogChoiceSelected:connect(function(Player, Choice) ...
58437
1
56976
1
33433971
Denny9876
1402
2018-05-15 00:17:05
<p>Tested your script. I think it's not working because LocalScripts don't run under dialogs. They only run under (from the <a target="_blank" href="http://wiki.roblox.com/index.php?title=API:Class/LocalScript">wiki</a>):</p> <ul> <li>Player Backpacks</li> <li>Player Characters</li> <li>StarterGui/PlayerGui</li> <li>Pl...
0
How do I make a script that will teleport myself, or others that uses it, to a specific coordinate?
683035764
LengthLG
2
2019-07-22 17:01:07
<p>I want a script for roblox that I can execute that will teleport me to specific coordinates in the map. I have asked for help in other places and I have found this:</p> <p>game.Players.playerName.Character.HumanoidRootPart.CFrame = CFrame.new(x, y, z)<br /> --or<br /> game.Players.playerName.Character.HumanoidRootPa...
84199
1
78210
0
9517042
LucarioZombie
291
2019-07-22 17:05:17
<p>Your script should transport the humanoidrootpart to your desired position. Set X to the x coordinate of your dest, Set Y to the y coord, Z to z coord.</p> <pre class='brush: lua'>local x = 0 local y = 100 local z = 0 game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(x, y, z) </pre> <p>Note tha...
0
How could I make startergui script not reset on player respawn ?
139740663
kikocraftak233
18
2020-06-29 16:17:46
<p>The title explains probably everything, I am trying to make a gui with a blur but when I click play it changes the team and removes the ui but doesnt remove the blur, I dont request a script just some roblox dev forum function site or some help thanks</p>
107751
1
How many parameters can a function hold?
53537032
Aesthetical
100
2014-02-27 23:48:13
<p>What is the maximum amount of parameters that a function can hold? Like this:</p> <pre class='brush: lua'>function lel(var1, var2, var3, etc) --Here end </pre>
340
0
How Do I Script Junctions?
18778983
busfan2012
0
2014-04-15 07:50:05
<p>Hey I am a Train Enthusiast And I Build A Lot Of Railway Lines.</p> <p>A Major Issue I have is I have 2 tracks, 1 goes one way the other goes the other. I Am starting to come up to stations with 3-8 Platforms. What I need is a script and some help with a Junction that is Automatic and when a train hits the sensor th...
1558
0
Look back script doesn't function as intended?
1421791231
IIGeoXoro134
0
2022-06-17 03:17:48
<p>Im making a Nextbot game and I made a script to allow the player to look back (Like Dying Light) but, it turns the player around and makes them go backwards instead of turning the players camera around and allow them to still go forward.</p> <pre class='brush: lua'>local plr = game.Players.LocalPlayer local char = p...
130377
1
How to clone a part into a player after death?
1357339884
SilverishReign
67
2021-10-01 07:20:14
<p>I just want to clone a part into the player after they die, the problem is, the part disappears when the player respawns, any help?</p> <pre class='brush: lua'><br />game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) local Children = character:GetChildren(...
127765
0
How to get the player from a TextButton from a BillBoardGui?
143096970
Rayguyban2
69
2021-02-13 01:00:43
<p>For context I am trying to make an execution button one like Shindo life, but I am struggling, becsause since the BillBoard is in the Head which is in the workspace it is quite hard to get the player since MouseButton1Down will not give you the player, and I tried to battle this by putting a local script in StarterG...
120055
0
How can I check for a key being held down?
35351404
lacikaturai
89
2016-11-12 21:33:10
<p>I'm trying use the UserInputService and a While Loop to detect w being held down, so I get smooth movement of my Part. However as soon as I let go of w it just keeps moving on its own and moves faster each time I press w again. How can I detect w being held down?</p> <pre class='brush: lua'><br />Char = workspace.Ch...
37139
0
SetCore: ResetButtonCallback has not been registered by the CoreScripts?
17742179
LordOfLuxury
84
2017-10-10 23:09:17
<p>I followed exactly what the wiki said to disable my game's reset button, but it keeps giving me the same error. I used to have a game with the exact same function that works but for some reason it doesn't here. Here's the line:</p> <pre class="brush: lua">game:GetService("StarterGui"):SetCore("ResetButtonCallback", ...
48581
2
51241
1
30399843
Protoduction
216
2018-01-04 16:55:06
<p>I've found that just adding a</p> <pre class="brush: lua">wait() </pre> <p>before your script can fix this problem - I believe that the corescript stuff hasn't loaded (or something along those lines)</p> <p>hope I'm not too late with this response - only just figured it out myself</p>
0
My collision groups don't work on players?
429417358
Bankrovers
104
2021-06-08 12:26:04
<p>Hi, I'm making a script that you can walk through other players. I can still walk through other players. What am I doing wrong?</p> <p>Script:</p> <pre class='brush: lua'>local PhysicsService = game:GetService("PhysicsService") local CollisionGroupName = "Players" PhysicsService:CreateCollisionGroup(CollisionGroupNa...
124191
0
Why is it not working?
51676109
TrollD3
105
2015-04-01 19:24:41
<p>Im trying to make an intermission thing for my fps lobby but its not working. Should I put this in a regular script or local script? Also can someone ell me how to fix this?</p> <pre class="brush: lua">hint = script.Parent minplayers = 4 function CheckForPlayers() if game.Players.NumPlayers &lt; minplayers then hint...
16227
1
19472
3
46052
chess123mate
5873
2015-04-02 01:37:29
<p>This code should be in a non-local script; it's part of the code that controls gameplay and thus affects more than one player.</p> <p>You haven't explained exactly what you want versus what you're getting.</p> <p>I know this isn't your question, but I recommend using a for loop instead of repeating the same lines ov...
0
How do I use Vector2?
24056470
Vescatur
95
2014-04-26 18:56:43
<p>I'm trying to set my AbsolutePosition of a GUI to be something new, but it said I had to use Vector2 to do this. I tried to set it to Vector2.new(120, 200), but it came up with an error saying "can't set value". Any help?</p>
3618
2
5019
1
7177436
Voltoxus
248
2014-04-26 19:00:55
<p>Try using UDim2.new(120,200)</p>
0
trying to script flight. error popping up &quot;attempt to index nil with 'Heartbeat&quot;?
1008124084
FallenAngel_ii
7
2022-10-02 20:33:13
<p>here is my script:</p> <p>local runService game:GetService("RunService") local contextActionService = game:GetService("ContextActionService") local connection = nil</p> <p>local function FlyAction(actionName, inputState, inputObject) if inputState ~= Enum.UserInputState.Begin then return Enum.ContextActionResult.Pas...
131786