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 i remove the death sound? | 146100287 | Gigaset39 | 111 | 2022-07-28 07:12:40 | <p>Hello from the other side, recently roblox removed the <em>UGH</em> sound, and repleced it whit.. <em>CAHH</em> , soo i tryed to replece it by ”playing the game” and copied that <em>Sound</em> file from <em>PlayerScripts</em>, i removed the death sound id, but i still hear <em>CAHH</em> when my avatar dies. soo.. i ... | 130979 | 3 | 118338 | 2 | 559514967 | T3_MasterGamer | 2127 | 2022-07-28 07:44:33 | <p>Try using this method. I tried it yesterday and it works. This method is being used for many years to make a custom death sound.</p>
<p>Run the game in studio. Go to <code>Players.Your username.PlayerScripts</code> click on "RbxCharacterSound" and copy it by Ctrl + C.</p>
<p>Then you going to stop the game, go to <c... |
2 | Help with .Touched()? | 31057122 | iLegitus | 130 | 2015-05-08 12:19:34 | <pre class="brush: lua">script.Parent.Touched:connect(function(hit)
hit.Parent -- Ect
end
</pre>
<p>So i want it to find the hit.parent's Player not its character?
Help quickly please,Its for a limited time thing</p>
| 17359 | 1 | 20745 | 2 | 5820674 | woodengop | 1134 | 2015-05-08 12:22:43 | <p>That's where <a target="_blank" href="http://wiki.roblox.com/index.php?title=GetPlayerFromCharacter"><code>GetPlayerFromCharacter</code></a> comes in handy, example script:</p>
<pre class="brush: lua">script.Parent.Touched:connect(function(hit)
local plr=game.Players:GetPlayerFromCharacter(hit.Parent)--It's getting ... |
0 | How to I scale my ImageLabel Size? | 424946127 | MiAiHsIs1226 | 104 | 2021-05-05 02:31:33 | <p>Hi, I made a masking image script today and I need help</p>
<p>The problem is.. I want to set my ImageLabel's Size into {1,0,1,0} which is it's parents size, but if I do that my ImageLabel will not mask because it follows it's parents size however if I use offset it masks perfectly.</p>
<p>I can send a video of it n... | 123111 | ||||||||
0 | How would I use region 3 as a hitbox on a projectile? | 124954093 | sonicpardo | 0 | 2021-09-29 00:40:08 | <p>I am currently trying to create a fireball script where I use a region 3 to detect if any players are in the hitbox when the fireball hits something using a .touched event any ideas on how I would possibly do this I'm not too familiar with Region3. The main issue I'm having is setting the CFrame of the region to the... | 127740 | ||||||||
0 | How do I get my key to work with my door after it gets cloned? | 171275787 | NotchBoy246 | 2 | 2021-05-02 06:42:53 | <p>So basically I made it so when you click a GUI button it clones a key (which is in ReplicatedStorage) and puts it in the players backpack but it doesn't open the door. It works when the key is in Starterpack but when its cloned nothing happens.</p>
<p>Here is my code for the button to clone the key:</p>
<pre class='... | 123022 | 1 | 112100 | 0 | 55174990 | sO_Ov | 275 | 2021-05-02 10:56:25 | <p>The reason for that ins't working is: you are cloning the tool on the client and this is not replicated to the server, so when you check if the player has the tool on server script, returns false, because it does not have it for the server, only for yourself. How solve it?</p>
<p>First Step: Create a Remote Event on... |
3 | How do I disable a player's control? | 528233 | Nickelz | 37 | 2018-12-06 19:15:06 | <p>I am trying to make a cutscene that includes a player walking to a point and such, but I cannot do that if the player decides to move by pressing the A,W,S,D keys or the arrow buttons. I used to use this:</p>
<pre class='brush: lua'>--LocalScript
local control = script.Parent:WaitForChild("ControlScript")
function S... | 71773 | 1 | 68084 | 1 | 85528545 | Kulh | 125 | 2018-12-07 01:15:33 | <p>Oops!! I did some testing, and found that the server cannot see the PlayerScripts folder!</p>
<p>This means you need to get the PlayerScripts folder in a local script, and fire it to the server script using a RemoteFunction!!</p>
<p>Here is what I came up with:</p>
<p><strong>What you need:</strong></p>
<p>RemoteEve... |
0 | How do I use a leaderstat value for a shop? | 59219652 | austenman123 | 2 | 2021-09-11 03:18:36 | <p>Hey!! I am trying to make an old style shop where you walk into a part and if you have enough "Cash" then you can go past, if not, nothing happens. Here is my local script in the part</p>
<p>`local leaderstarts = game.Players.LocalPlayer:WaitForChild("leaderstats"):WaitForChild("Cash")
local part = script.Parent
loc... | 127359 | 1 | 115577 | 0 | 331809274 | TechModel | 118 | 2021-09-11 04:05:51 | <p>Locals scripts don't work when it is in a part on workspace I think. What I've done here is you put the part that you want to walk through and put it in ReplicatedStorage. Create a local script and put it in StarterGui.</p>
<pre class='brush: lua'>local leaderstarts = game.Players.LocalPlayer:WaitForChild("leadersta... |
0 | How do i make a surface gui the teleports player to another place when clicked? | 13038536 | reteach | 0 | 2014-03-01 19:38:13 | <p>Here is what i have so far</p>
<pre class='brush: lua'>--!
local x = script.Parent
x.Parent = game.StarterGui
x.Adornee = game.Workspace.TpButton.Parts
function onclicked()
game:GetService('TeleportService'):Teleport(147513144, game.Workspace.LocalPlayer)
end
x.TeleportButton.MouseButton1Down:connect(onclicked)
</pr... | 401 | ||||||||
0 | the error says "attempt to call a nil value" I’m guessing its the bullets fault? | 159636940 | RareBIue | 128 | 2020-07-31 22:39:57 | <pre class='brush: lua'>local ReplicatedStorage = game:GetService("ReplicatedStorage")
local bullet = ReplicatedStorage:WaitForChild("Bullet")
local gun = script.Parent
local speed = 200
script.Parent.Parent.Activated:Connect()
local Bullet = bullet:Clone()
Bullet.Position = gun.Position
Bullet.Parent = game.Workspace
... | 110416 | ||||||||
1 | Is there a function to make a script restart? | 1519151497 | FluffySheep46209 | 369 | 2020-05-03 12:20:31 | <p>I am making a zombie game and when the generator dies I want to make it so that the spawn script restart. Its just 1 big spawn script</p>
| 101718 | 2 | 93965 | 1 | 320691098 | Gojinhan | 353 | 2020-05-03 13:06:49 | <p>These methods are nearly one of the same, but you can wrap the entire script into a bindableevent and run the code all over again.</p>
<p>And similarly, easier, and more performanently you can just put your script into a module function and call it as many times as you want and whenever.</p>
<p>edit: op asked for an... |
2 | How to stop sky box fading at night time? | 1002773 | Spongocardo | 1991 | 2014-10-06 17:29:06 | <p>Hi everyone. I've created a sky box and I would like to keep the sky box the same at night time. However, I don't know if this is possible or not.</p>
<p>Naturally, ROBLOX makes the sky box fade out at night time into either a black sky or a "sky full of stars", depending on the <code>CelestialBodiesShown</code> pro... | 11471 | ||||||||
0 | How would I make a custom gui for the backpack in roblox instead of what it is now? | 146413048 | CaptainD_veloper | 290 | 2019-03-02 02:04:04 | <p>I want to make a custom gui for the inventory, the backpack what it is now is a rectangular gray thing that doesn't look good, so I want to make it squares and gray, kidna like minecraft. Does anyone know how?</p>
| 77061 | ||||||||
0 | Why does the death counter work but the autosave does not? | 1527823663 | kickoff127 | 15 | 2020-11-27 22:41:22 | <p>So I wanted to make a death leaderboard with autosave for me game, so I made this script:(Someone else's script)</p>
<pre class='brush: lua'><br />--This script was made by ROBLOXSCRIPT ISEASY
local DataStoreService = game:GetService("DataStoreService")
local DataStore = DataStoreService:GetDataStore("Deaths") -- Ch... | 116419 | ||||||||
0 | Remote event doesnt get activated through the type check in my script? | 79523404 | snipperdiaper | 120 | 2022-06-21 19:18:53 | <p>In this script I am trying to pass a RemoteEvent once you say "Hello" But nothing is working, and theres no errors.</p>
<p>Script:</p>
<pre class='brush: lua'>local replicatedstorage = game:GetService("ReplicatedStorage")
local RemoteEventConnection = game.ReplicatedStorage:WaitForChild("CommissionTest")
local playe... | 130442 | 1 | 117780 | 1 | 94006350 | BulletproofVast | 776 | 2022-06-21 19:53:43 | <p>don't really recommend using this from a local script, way more secure while checking on the server, also wouldn't need the remote.</p>
<pre class='brush: lua'>local ReplicatedStorage = game:GetService("ReplicatedStorage")
local MarketplaceService = game:GetService('MarketplaceService')
local RemoteEventConnection =... |
0 | How to make a wait for a tool animation? | 110583918 | oborlex | 4 | 2021-05-16 11:39:51 | <p>So i want to figure out how to make it so after you click a animation plays for the tool (simple right) so i did that but now the wait (.6 seconds) you can still spam click and have the animation play before the tool is ready to fire again.</p>
<p>is there a way to do this via using just wait(.6) or do i have to hav... | 123488 | 3 | 112725 | 0 | 738846584 | SparkyTheCorruptCone | 35 | 2021-05-21 01:45:30 | <pre class='brush: lua'>local isAnimating = false
local function yourFunction()
if isAnimating == false then
animation:Play()
isAnimating = true
animation.Stopped:wait() -- wait until this animation stopped!
isAnimating = false
end
end
</pre>
<p>You can use a variable to show if ... |
0 | Leaderboard Player Rank gui help? | 45536795 | Jupiturd | 15 | 2014-12-08 23:08:53 | <p>I'm trying to make a gui I made display the player's rank and i'm having trouble finding out how to do that, I already made the "Rank" stat on the leaderboard.(i'm using the default linkedleaderboard and I have a gui named "YourRank" with a Frame named "Frame" and a Text Label named "Rankz")</p>
<pre class='brush: l... | 13112 | ||||||||
0 | How to determine which picks up multiple variables but are the same? | 331809274 | TechModel | 118 | 2022-06-27 10:09:45 | <p>As in meaning two variables with the same name like putting pcalls in every function to ensure smooth and error less. However I can't just generate myself random locals for every pcalls I made. Is this really picking up errors with correct variables or out of the function variables printing inside it?</p>
<p>And mak... | 130532 | 1 | 117876 | 1 | 1014156252 | Puppynniko | 1059 | 2022-06-27 11:47:54 | <p>so roblox Luau goes from top to bottom and when the variables get changed at the top it gets overridden by the bottom lines of code</p>
|
142 | What is the Best Way to let players "See Through" Portals / Surfaces? | 386992 | BlueTaslem | 18071 | 2014-04-15 22:18:04 | <p>I am referring to the portals in the valve game, although they work like you'd expect -- through a particular space on a portion of a wall, a difference scene is visible through.</p>
<p>(This is a large project and I don't at all expect a <em>code</em> answer, just ideas and suggestions from other scripters who have... | 1885 | ||||||||
0 | How do I access every players leaderstats in the game? | 1139499518 | Ferceplay78y | 0 | 2023-03-15 02:01:17 | <p>So I made a leaderstats script and I want to access it into another script is this possible here is my code.</p>
<pre class='brush: lua'><br />game.Players.PlayerAdded:Connect(function(plr)
local ls = Instance.new("Folder")
ls.Parent = plr
ls.Name = "leaderstats"
local Levels = Instance.new("IntValue... | 133189 | ||||||||
1 | Adonis Command Logs to Discord [WEBHOOK]? | 33956235 | CasteIite | 5 | 2019-08-14 20:20:28 | <p>I'm trying to get it to where any Adonis admin command that is executed will show up in my discord channel. I'm not a scripter, and I need <strong>major</strong> help.-- I do not want non-admins showing up in the channel whenever they chat ":". I just want the administrator's admin commands. I also have a format tha... | 85808 | ||||||||
0 | 3rd party communication between client and server?! | 255807472 | GooierApollo664 | 183 | 2018-11-26 12:01:21 | <p>I have Filtering Enabled on and I'm doing everything to prevent Exploiting, so I try to make everything exploitable with remotes.</p>
<p>But I'm Troubling with Buying System I have.</p>
<p>I want to have one script in ServerScriptService that will take object clicked by client as an argument and then do things (char... | 71177 | ||||||||
0 | Door wont open when touched? | 63867266 | Scripter79 | 0 | 2015-02-04 06:51:35 | 14735 | |||||||||
0 | Anchor button script does not work due to Network Ownership? | 199922562 | nenea33real | 0 | 2020-12-09 19:55:00 | <p>Hello, I have been using an anchor button script for a long time which does its job, partially - to freeze the vehicle. The scripts either anchors or disables the anchor for a part inside the bus. The problem is that when I jump out of the bus, the script(or the button, I do not know exactly) does not work anymore a... | 116990 | ||||||||
1 | Why will the part not clone? | 327901308 | MOREHOURSOFFUN | 40 | 2020-06-29 04:33:58 | <pre class='brush: lua'>game.Players.PlayerAdded:Connect(function(plr)
game.Workspace.part:Clone()
local char = game.Workspace:WaitForChild(plr.Name)
local Weld = Instance.new("Weld")
Weld.Part0 = char["Right Arm"]
Weld.Part1 = game.Workspace.part
Weld.Parent = game.Workspace.part
end)
</pre>
<p... | 107704 | 1 | 99012 | 2 | 1222281551 | botw_legend | 452 | 2020-06-29 04:38:38 | <p>so put the part in server storage and change the code to this</p>
<pre class='brush: lua'>game.Players.PlayerAdded:Connect(function(plr)
local clonepart = game.ServerStorage.Part:Clone()
clonepart.Parent = game.Workspace
local char = game.Workspace:WaitForChild(plr.Name)
local Weld = Instance.new("We... |
0 | How to make it so that when a player presses on a part, they take damage until their health is at 1? | 1039602854 | Skyyrn | 1 | 2021-02-22 02:53:06 | <p>Title explains it all. I know how to use the ClickDetector and how to input a function, but I don't know how I would make a function that damages the player every 2 or so seconds. Can someone help and explain to me what I need to use?</p>
| 120494 | 2 | 109872 | 0 | 102254161 | squidiskool | 200 | 2021-02-22 03:00:41 | <p>Here.</p>
<pre class='brush: lua'>local clickdetector = script.Parent.ClickDetector
clickdetector.MouseClick:Connect(function(plr)
repeat
wait(0.1)
plr.Character.Humanoid.Health = plr.Character.Humanoid.Health - 1
until plr.Character.Humanoid.Health == 1
end)
</pre>
<p>When it makes it damage... |
0 | Sound Play on-touch script help? | 14096387 | arjun9022 | 34 | 2014-04-16 23:18:51 | <p>I'm finding it hard to make a script, that allows each part named something, like for example grass, have a sound when you step on it. I made a script with a function, and well here it is:
function touch(hit)</p>
<p>function touch(hit)
if hit.Name == "Grass" then
end
end
script.Parent.Touched:connect(touch)
Workspac... | 2304 | 1 | 3147 | 2 | 35339312 | ImageLabel | 1541 | 2014-04-16 23:27:59 | <pre class='brush: lua'>workspace.Part.Touched:connect(function(hit) -- .Touched
if hit.Name == "grass" then
print("Nothx")
else
workspace.Sound:Play()
wait(1)
workspace.Sound.Looped = true --False if not supposed to loop
end
end)
</pre>
<p>--In order to loop the sound, you must set it's "Looped" pro... |
0 | This script still makes you sit? | 59370195 | RedstoneStudios | 0 | 2014-04-17 00:33:59 | <p>I even have it set to false but it still makes you sit, how do you fix this?</p>
<pre class='brush: lua'>function onDamage(Part)
if Part.Parent:FindFirstChild("Humanoid") ~= nil and Part.Parent.Name ~= "script.Parent.Name" then
script.Disabled = true
f = Instance.new("Fire", Part)
for i =... | 2319 | 1 | 3170 | 0 | 6064318 | spyclub65 | 20 | 2014-04-17 00:44:37 | <pre class='brush: lua'> if Part.Parent:FindFirstChild("Humanoid") ~= nil and Part.Parent.Name ~= "script.Parent.Name" then
</pre>
<p>This line is the problem. It should say</p>
<pre class='brush: lua'> if Part.Parent:FindFirstChild("Humanoid") ~= nil and Part.Parent.Name ~= script.Parent.Name then
</pre>
|
1 | Help with fixing my leaderstats reset on death script? | 107699267 | Puffyjasonrocks84 | 32 | 2022-05-06 20:57:47 | <p>I am making a survival game and I have a script that resets the players leaderstat on player death but it resets all leaderstats instead of just my time leaderstat called "Timex" here is my script:</p>
<pre class='brush: lua'>local function onPlayerAdded(plr)
local con1
plr.CharacterAdded:Connect(function(ch... | 129933 | 1 | 117376 | 1 | 1020531782 | sata5pa3da | 264 | 2022-05-07 03:08:14 | <p>Firstly, you do not need to store the humanoid died connection in a variable because all connections tied to an instance are automatically disconnected as soon as the instance is destroyed.</p>
<p>Secondly, the "ClassName" property of any instance is already a string, making it useless to convert it again to string.... |
0 | UserInputService only when holding a Tool? | 121396716 | DAsanicmaster | 52 | 2019-06-09 16:47:49 | <p>So i have been trying this for a long time and still can't do it.How do i make it so that when the player is holding a tool <em>THEN</em> they can use UIS (UserInputService).Most of the time i can use the UIS without holding the tool and that is not what i am trying to get.</p>
<pre class='brush: lua'>wait(3)
local ... | 81456 | 2 | 75790 | 0 | 18868943 | Asentis | 17 | 2019-06-09 19:44:39 | <p>I figured out the problem here.</p>
<p>There's a setting within the tool called 'RequiresHandle'. If this is enabled, <strong>the tool will wait for a handle and will yield the script</strong>.</p>
<p>If you don't want a handle, make sure that's disabled or else include a part within the tool called 'Handle'.</p>
<p... |
1 | Error: Attempt to index a nil value? | 205456885 | SuperBeeperman | 30 | 2018-05-05 02:06:00 | <p>title is my error, what is wrong? it says its something in line 3...</p>
<pre class='brush: lua'>game:GetService("Players").PlayerAdded:Connect(function(player)
local Como = player.PlayerGui:FindFirstChild("Password")
Como.Enabled = true
game.Lighting.Blur.Enabled = true
local Hobo = player.Character... | 57954 | ||||||||
0 | how would I teleport a player with a proximity prompt? | 289620633 | CrazyWatermelon211 | 4 | 2022-11-10 02:17:52 | <p>how would I teleport a player to a specific location using a proximity prompt. I've tried a couple of things but none of them have worked.</p>
<p>Any help is much appreciated.</p>
| 132226 | 1 | 119426 | 1 | 123585026 | NykoVania | 231 | 2022-11-10 02:42:56 | <p>Put this script in your proximity prompt.
Change 0,0,0 to your position.</p>
<p><strong>SCRIPT</strong>:</p>
<pre class='brush: lua'>script.Parent.Triggered:Connect(function(player)
player.Character:MoveTo(Vector3.new(0,0,0))
end)
</pre>
|
0 | OnTouched Part giving +1 score to Player Touched | 462428 | RSoMKC | 45 | 2014-02-19 17:51:06 | <p>I have this block of code, however my onTouched doesn't function.</p>
<pre class='brush: lua'>local Finish = MapWin.Finish
Finish.onTouched:connect(function(player)
player.leaderstats.Score.Value = player.leaderstats.Score.Value +1
Finish:Destroy()
</pre>
<p>As you can see I want the player that first to... | 92 | 3 | 179 | 1 | 1546726 | nate890 | 495 | 2014-02-19 17:53:34 | <pre class='brush: lua'>local Finish = MapWin.Finish
Finish.Touched:connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
player.leaderstats.Score.Value = player.leaderstats.Score.Value +1
Finish:Destroy()
end
end)
</pre>
|
2 | KeyDown not working? | 46332524 | Grenaderade | 525 | 2014-05-23 23:40:27 | <p>So, I'm trying to make a Gui Game, but the "onkeydown" isn't working, 38 means ^.
Thats the key number. But it's not working, any help?</p>
<pre class='brush: lua'>function onkeyDown(key)
if key == 38 then
script.Parent.Position.Z = 200
end
end
</pre>
<p>or</p>
<pre class='brush: lua'>function onkeyD... | 5360 | ||||||||
0 | How am I supposed to check when a console player enters & leaves a GUI element? | 111334263 | Evercyan | 5 | 2018-04-17 06:11:38 | <p>I have a shop that opens up a "tooltip" next to the mouse when entering on computer, here's the code.</p>
<pre class='brush: lua'>plr = game.Players.LocalPlayer
ReplicatedStorage = game:GetService("ReplicatedStorage")
GameItems = ReplicatedStorage:WaitForChild("GameItems")
UI = script.Parent
TIP = UI.ShopTooltip
fun... | 56986 | ||||||||
0 | if statement not working properly? | 1446445304 | ConceptBasics | 2 | 2020-09-28 20:37:49 | <p>I have this script that is supposed to make the player's gui visible if playing is equal to false and make it not visible if playing is equal to true but for some reason the script constantly outputs saying "playing = false" even when I make the playing value equal true? The playing value is a boolean value in a fol... | 113766 | 1 | 104423 | 3 | 1708043824 | TheLuminent | 970 | 2020-09-28 21:52:30 | <p>Here's my code, a good explanation in the notes as well.</p>
<pre class='brush: lua'>--[[
It is suggested that you use "workspace" instead of "game.Workspace".
]]
while wait() do
--[[
It's good to use pcall (protect-call) so that you don't run into an error.
]]
pcall(function()
script.Parent.... |
0 | FindFirstDescendant is not enabled? | 703610999 | R_LabradorRetriever | 198 | 2021-06-05 17:51:38 | <p>This happens whenever I try to use the <code>FindFirstDescendant</code> function</p>
<p>Is there a way to "enable" it?</p>
| 124106 | 3 | 113151 | 1 | 640725831 | iuclds | 720 | 2021-06-06 07:45:30 | <pre class="brush: lua">FindFirstChild(string:instanceName, boolean:recursive)
</pre>
<p>recursive - search through the children of children, and the children of those children, etc.
tip: children of children is known as getdescendants()</p>
|
0 | How do I make blocks one directional? | 1112337243 | Pejoume | 11 | 2022-09-20 06:21:20 | <p>So I'm working on a combat system and I know how to make blocking and stuff work, but my issue is that I don't know how to make it so if you punch the person that's blocking from behind it breaks their block. If anyone could help me with this issue I'd greatly appreciate it, all I need is a function to see if a play... | 131678 | 2 | 118926 | 0 | 559514967 | T3_MasterGamer | 845 | 2022-09-20 11:49:49 | <p>You can use <a target="_blank" href="https://devforum.roblox.com/t/cross-and-dot-products/988593"><strong>Dot Products</strong></a> to see if a part is seen in another part's field of view. It basically returns 0.5 to 1 if the part is in front of another part and returns 0 or less if it's in the side/back. Here's a ... |
0 | How to use Math.random? I forgot it | 1045409486 | HoIyScript | 51 | 2019-10-06 15:57:07 | <p>Hey there! I totally forgot how math.random worked.</p>
<p>Could anyone explain this to me?</p>
<p>I need it for a FOV changer that just changed the fov at random moments.</p>
| 88421 | 2 | 82078 | 2 | 1792778813 | Xapelize | 2326 | 2019-10-11 07:58:09 | <p>A math.random(min,max) is a <strong>CODE</strong> for getting a random number.</p>
<pre class='brush: lua'>print(math.random(1,10))
</pre>
<p>Output :</p>
<blockquote>
<p>8</p>
</blockquote>
<p>This CODE means to print a number that 1 to 10.
Let's do another code :</p>
<pre class='brush: lua'>print("math.random(1,10... |
0 | Make something happen when a parts position changes? | 11808841 | blowup999 | 562 | 2014-02-28 03:07:43 | <p>Is it possible to make a function happen whenever a parts position changes, like lets say every time i move my torso i get .5 more walkspeed?</p>
| 347 | ||||||||
0 | How do I get rid of the "Left hand is not a valid member of model" error? | 124821760 | Creeperbob16 | 16 | 2020-06-30 02:42:09 | <p>I have this script which is supposed to make an AI move towards the player. This script works if you replace anything that says LeftHand with HumanoidRootPart. I had to change the script as there were multiple AI causing them to attack each other instead of the player. I deleted the left hand of the AI as it doesn't... | 107812 | ||||||||
0 | WaitForChild of a variable? | 166320833 | sp33dmcreation | 2 | 2019-02-20 03:32:32 | <p>Hi, I wanted to take the Button's name as a variable when that button is clicked on. And by doing so, I plugged in the variable into the WaitForChild, hoping it would detect the button's name and find that in replicated storage. This doesn't seem to be working, any ideas?</p>
<p>This is an attempt of a 3dmodule onto... | 76538 | ||||||||
0 | How do I make script where when someone buys an game pass they get some sort of effect? | 676627265 | iSimonPlayz | 0 | 2020-03-18 14:27:53 | <p>Hello,
I'm building my simulator and I want to add a feature so when you buy a game pass you get a lightning effect (I already made) and I'm wondering do I make that kind of script.</p>
| 96357 | ||||||||
0 | Changing a rigs humanoid description to the players character, not working? | 881309557 | THEGOBLINTOPLAD | 0 | 2021-07-25 11:34:06 | <p>Making another character customization thing again and I wanted to create a GUI where the player is changing the hair and etc of their original design on roblox,</p>
<p>so I decided to make a rig that would copy the players character through humanoid description
when they joined (its only one player per server once ... | 125702 | ||||||||
0 | How would I use :GetTouchingParts() and check the names of the parts it returns? | 34939297 | nanaluk01 | 247 | 2016-12-27 15:13:32 | <p>How would I use <code>:GetTouchingParts()</code> and check the names of the parts it returns?</p>
<p>I have tried multiple things in ROBLOX Studio with :GetTouchingParts() , but I can't get it to work properly, and yes, my parts are all CanCollide-able.</p>
<p>The ROBLOX Wiki does not explain this that well, so I ha... | 38426 | 1 | 40790 | 6 | 47966663 | Pyrondon | 2089 | 2016-12-27 15:49:39 | <p><a target="_blank" href="http://wiki.roblox.com/index.php?title=API:Class/BasePart/GetTouchingParts"><code>GetTouchingParts()</code></a> returns a table of parts which are touching the part in question. The description from the wiki is as follows, "Returns a table of all CanCollide true parts that intersect with thi... |
1 | How exactly do you guys know what functions,variables,etc to put? | 110258409 | Daiko_King | 1 | 2017-01-18 22:32:46 | <p>I have a good understanding of scripting. But when it comes to making a script for my game. I usually need help. I want to know what would help me KNOW what to do when I want to do something mostly.
Please help me guys.</p>
| 39160 | 2 | 41455 | 1 | 38036947 | marioblast1244 | 113 | 2017-01-18 23:52:43 | <p>Well, to put it into perspective, functions and variables aren't that hard once you learn about them. Functions are things that happens when something else activates is. An example is that when you want to print my IGN when I want it to, you would put something like this:</p>
<pre class='brush: lua'>function myName(... |
0 | TextButton script to teleport players isn't working? (inside a part) | 1319896863 | ZombieApocalypz3 | 35 | 2020-09-13 16:54:42 | <p>I made a Surface gui inside a part and then made a TextButton inside it because that's how part gui's work. Anyways I placed the script that always worked in normal StarterGui GUI's but it isn't working inside a part gui. Can you help me please?</p>
<pre class='brush: lua'>local debounce = true
local player = game.P... | 113121 | 2 | 103845 | 0 | 1613881755 | brodywth | 97 | 2020-09-13 17:19:23 | <p>Is the script in the text label?</p>
<p>If not then try these:</p>
<p>Instead of script.parent, call upon the gui via part ex:</p>
<pre class='brush: lua'>local 1=target.NameofGUI.NameofTextLabel:WaitForChild()
</pre>
<p>Also maybe instead of defining the local player through players, define the player through the f... |
0 | Resizing a model or a part changes the PivotPoint in-game? | 1017846707 | Overseer_Prince | 188 | 2023-02-23 00:16:49 | <p>So anyways I have a script where players can resize their model</p>
<p>now the problem I have is that because resizing changes the pivot point</p>
<p>whenever I use :GetPivot() onto their model whenever they drag</p>
<p>the pivot changes so basically if they resize like 5 upwards on the y axis</p>
<p>everytime they ... | 133107 | 1 | 120197 | 1 | 559514967 | T3_MasterGamer | 2189 | 2023-02-23 09:41:59 | <p>I'm assuming you're using my answer from <a target="_blank" href="https://scriptinghelpers.org/questions/133098/how-to-scale-models-properly-through-script-using-attributes">the previous question</a>. <strong>Sadly, you can't change model's pivot offset.</strong> However, if you want to get the original pivot, you c... |
0 | Changed or GetPropertyChangedSignal()? Which one is better? | 58729054 | Dovydas1118 | 1495 | 2020-06-11 12:52:37 | <p>On IntValues, I've seen people talk about using either <a target="_blank" href="https://developer.roblox.com/en-us/api-reference/event/IntValue/Changed"><code>IntValue.Changed</code></a> or <a target="_blank" href="https://developer.roblox.com/en-us/api-reference/function/Instance/GetPropertyChangedSignal"><code>Int... | 106087 | 2 | 97706 | 1 | 640725831 | iuclds | 720 | 2020-06-11 13:49:52 | <p><strong>Changed,</strong></p>
<p>Changed is used mainly for instances that usually have just 1 property, for instance, a BoolValue or a NumberValue. However, there can be some false positives such as when the name is changed and you're only trying to know when another property is changed. Here's some example code, d... |
0 | player adding and removing counter script not working please help me? | 946498536 | Not_Paulo | 4 | 2020-09-22 19:38:03 | <pre class='brush: lua'>game.Players.PlayerAdded:Connect(function()
game.Workspace.Value.Value = game.Workspace.Value.Value + 1
end)
game.Players.PlayerRemoving:Connect(function()
game.Workspace.Value.Value = game.Workspace.Value.Value - 1
end)
game.Workspace.Value.Value = game.StarterGui.ScreenGui.TextLabel.Te... | 113498 | 1 | 104196 | 0 | 1850403883 | yuni_Boy1234 | 320 | 2020-09-22 20:26:18 | <p>Well if the value is an IntValue type, you should do the following:
I don't know what is your goal with this,so you may clarify it so i can help you better.</p>
<pre class='brush: lua'>game.Players.PlayerAdded:Connect(function(Player) --When a player joins this event is fired,giving the parameter of the player who j... |
0 | How do you make Roblox studio stop assuming all the scripts are "uncommited"? | 777304992 | Nifemiplayz | 32 | 2020-04-16 20:34:49 | <p>I was scripting and it randomly pops up saying its not saved.</p>
| 99524 | 4 | 91932 | 1 | 1531696143 | Luka_Gaming07 | 529 | 2020-04-16 20:42:05 | <h2>Roblox added a new feature for team create called collaborative editing.To disable it go to Game Settings > Options > Collaborative Editing.</h2>
<p>However if you want to use the feature what is basically does is allows more than one person to edit a script. to commit scripts go to View > Drafts and enable it then... |
0 | How to use remote events/functions? | 76938451 | AZDev | 590 | 2016-01-28 17:14:16 | <p>I have no real experience with either of these so any help is appreciated.</p>
<p>I have created scripts that work if filtering enabled is not on. I now need to rewrite them for filtering enable due to my game being exploited.</p>
<p>Here is what needs to happen in pseudo.</p>
<pre class="brush: lua">--[[
When the p... | 26783 | 1 | 30320 | 3 | 725403 | iconmaster | 301 | 2016-01-28 17:47:05 | <p>So, you'll want a remote event to trigger in order to respawn a hit player. You can't do this on the client side (the LocalScript side), so you'll have to use a <a target="_blank" href="http://wiki.roblox.com/index.php?title=API:Class/RemoteEvent">RemoteEvent object</a>.</p>
<p>On the server, you'll take the RemoteE... |
0 | How to reward players with a badge? [Solved] | 103919802 | TheBuliderMC | 47 | 2020-03-25 23:38:40 | <p>How do i rewards players when time they reach a time limit? (there is a time limit, and it works.)</p>
<p>ERROR: "userId is not a valid member of Part"</p>
<pre class='brush: lua'>local Boards = workspace.Keycard
local door = workspace.Door
local WALL = workspace.BlahBlah
local LOL = workspace.Block
script.Parent.To... | 97086 | ||||||||
0 | How do i make a dodge/roll move using a hotkey? | 86419097 | codee21 | 4 | 2018-07-01 21:30:39 | <p>Trying to make a game with a lot of fighting, and I wanted to add a roll by pressing a button(like "r")to dodge attacks, but all the scripts ive tried have not worked.</p>
<p>Thanks for any help!</p>
| 61612 | ||||||||
0 | TouchEnded Event triggers when character jumps? | 7685797 | naturewizard | 85 | 2023-01-14 16:46:11 | <p>Hello!</p>
<p>I want to stop the touch ended event from triggering when user jumps.</p>
<p>is there a method I can use to stop/cancel touch ended event from triggering when user jumps, a couple methods I have tried.
---if Humanoid.Jump == true then return
---game:GetService("UserInputService").InputBegan.... if inpu... | 132833 | ||||||||
0 | My CharacterAdded Statement is not working. What did i forget? | 351467574 | Galaxybombboy | 134 | 2021-01-13 03:53:50 | <p>I have a <code>CharacterAdded</code> script. I assume it's something wrong with the syntax, though, I'm unsure. What have I done wrong, can anyone give me some insight?</p>
<pre class='brush: lua'>game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Wait(function(char)
char.Humanoid.WalkSpee... | 118629 | 2 | 108506 | 1 | 1085356580 | LeedleLeeRocket | 1257 | 2021-01-13 04:18:41 | <p>Just set char to plr.Character or plr.CharacterAdded:Wait()</p>
<pre class="brush: lua">game.Players.PlayerAdded:Connect(function(plr)
local char = plr.Character or plr.CharacterAdded:Wait()
char.Humanoid.WalkSpeed = 30
end)
</pre>
|
3 | Changing Body Colors | 6558063 | BLUUAH | 20 | 2014-03-11 23:13:12 | <p>So I want to Change my body color, but i keep getting confused when trying to label the BodyParts, or If I'm susposed to use "Larm" as a Variable or something.</p>
<p>My Scripting Knowledge is Limited, and LuaLearners is Down.....This doesn't go well.</p>
<p>Im trying to change it to "Institutional white"</p>
| 640 | 4 | 1030 | 1 | 38247353 | coo1o | 227 | 2014-03-12 08:52:26 | <p>Here's a nice dealio using a table and the Body Colors object of character models.</p>
<pre class="brush: lua">bodyColors = {'HeadColor', 'LeftArmColor', 'LeftLegColor', 'RightArmColor', 'RightLegColor', 'TorsoColor'}
for _,color in pairs(bodyColors) do
workspace.Player1["Body Colors"][color] = BrickColor.new("I... |
0 | How do I make this script uninterruptible with keybind activation? | 204410354 | LimitedVxrsion | 3 | 2021-01-08 15:48:22 | <p>Hi, Im trying to make a Gui wich activates on pressing M. the script works perfectly I just don't know how to make it so it cant be interupted? Because if I press M a couple of time it breaks. With this i mean that M does nothing when the Gui is animating on the screen.
Thanks in advance.</p>
<pre class='brush: lua'... | 118399 | 1 | 108329 | 1 | 1085356580 | LeedleLeeRocket | 1179 | 2021-01-08 16:18:42 | <p>I think a boolean would be applicable to this situation. The player will be unable to spam while the tween is playing.</p>
<pre class="brush: lua">local Travel = script.Parent.Parent.Travel
p = game.Players.LocalPlayer
mouse = p:GetMouse()
local canPress = true
mouse.KeyDown:connect(function(key)
if not canPress... |
0 | How to detect when a player holds down a key(not just press)? | 37442581 | Brockanthony10 | 19 | 2020-07-12 05:58:17 | <p>this is my code, its for a sprint button</p>
<pre class="brush: lua">local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
mouse.KeyDown:connect(function(key)
if key == "r" then
print("r Pressed")
game.ReplicatedStorage.Events.stamniaEvent:FireServer(plr)
end
end)
</pre>
<p>I know... | 108843 | ||||||||
0 | How to make gui object move to mouse on surfacegui? | 5719877 | Quil_Cyndaquil | 26 | 2017-07-10 09:42:52 | <p>So, me and a friend are making a surfacegui computer thing, and I was wondering how I'd move the GUI object onto the cursor, relative to the surfacegui, so while my cursor is on the surfacegui, the cursor goes onto my mouse on the surfacegui.
Here's my code so far:</p>
<pre class='brush: lua'>mouse.Move:connect(func... | 45059 | ||||||||
0 | Button door help? | 19517471 | bloonblaster2000 | 55 | 2014-05-08 21:19:23 | <p>So basically, the script is about when a player steps on a part called Button, a message appears, dissapears, and the door opens, stays open for 10 seconds, and closes again. Is this right?</p>
<p>Message on touch script</p>
<pre class='brush: lua'>local debounce = true
function onTouch(Part)
if debounce and Button.... | 4534 | ||||||||
2 | GetFreeModels (InsertService) | 31655670 | Greatgreatgood5 | 55 | 2014-02-17 19:07:38 | <pre class="brush: lua">game:GetService("InsertService"):GetFreeModels(42040828).Parent = Workspace
</pre>
<p>Whats the problem? :[</p>
| 40 | 2 | 80 | 3 | 4030068 | jobro13 | 980 | 2014-02-17 19:10:14 | <p><code>:GetFreeModels()</code>is a member of InsertService, but that will return a table - it basically is a search request. The method you intend to use is<code>:LoadAsset()</code></p>
<pre class="brush: lua">game:GetService("InsertService"):LoadAsset(42040828).Parent = Workspace
</pre>
|
0 | How to get players to teleport to a team? | 15619704 | NinjoOnline | 1147 | 2014-04-17 10:55:30 | <pre class='brush: lua'>if game.Workspace.Bool.Value == true then
maps = game.ServerStorage.Maps:GetChildren()
map = maps[math.random(1, #maps)]
map:Clone().Parent = game.Workspace
blue = 0
red = 0
local teamplay = game.Players.GetChildren()
for i = 1,game.Players.NumPlayers do
local... | 2411 | 1 | 3334 | 0 | 1810473 | hiccup111 | 231 | 2014-04-17 11:44:32 | <p>As long as the teams are allocated, and the SpawnPositions are in the game (atleast in workspace), you can just re-spawn the characters.</p>
<p>Quick Respawn Method : (Server Script only)</p>
<pre class='brush: lua'><br />player = game.Players.Player1
player :LoadCharacter()
</pre>
<p>--http://wiki.roblox.com/index.... |
0 | How can i add animations to this flying script? | 364796628 | Funnyskyswagway3 | 30 | 2020-07-08 01:06:21 | <pre class='brush: lua'>repeat wait()
until game.Players.LocalPlayer and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:findFirstChild("Head") and game.Players.LocalPlayer.Character:findFirstChild("Humanoid")
local mouse = game.Players.LocalPlayer:GetMouse()
repeat wait() until mouse
loca... | 108491 | ||||||||
0 | How to make a character move with the spinning part using CFrame? | 559514967 | T3_MasterGamer | 2189 | 2022-05-16 09:13:51 | <p>I'm trying to <strong>rotate a model</strong> using its <em>PrimaryPart</em>. It is working, but it doesn't <strong>move my character</strong>. I tried using <strong><em>BodyForce and Constraints</em></strong> like weld and hinge, but nothing works. I saw an <strong>answer</strong> in the <em>DevForum</em> saying yo... | 130015 | 1 | 117915 | 1 | 1014156252 | Puppynniko | 1059 | 2022-07-01 11:20:01 | <p>Use a CylindricalConstraint or HingeConstraint
make sure AcuatorType is Motor add a attachment to a part and set the
HingeConstraint.Attachment0 to the part you want to spin and
HingeConstraint.Attachment1 to a part thats anchored and inside of Attachment</p>
|
1 | I am unsure of how this global variable doesn't work? | 1006980086 | mandibleknox | 4 | 2020-07-23 13:57:01 | <p>I am a little confused on why this doesn't work, i'm somewhat of a beginner but i do have some understanding of some complex things. I created a global variable for "clone" and assigned it within an if statement which is also in a while true do loop. I thought that when i assigned this clone a value i would be able ... | 109770 | 1 | 100894 | 1 | 103833540 | deeskaalstickman649 | 388 | 2020-07-23 14:15:12 | <p>You're writing</p>
<pre class='brush: lua'>local function
</pre>
<p>which creates a new function. To set a variable equal to a function, write:</p>
<pre class='brush: lua'>variable name = function(paramaters)
</pre>
<p>.</p>
|
0 | HTTPGET is not a valid member of DataModel? | 1095675844 | ImAnonymousBan | 24 | 2020-04-28 13:31:37 | <p>So I'm making a player whitelist and when I play the game, it gives me HTTPGET is not a data model Error. please help me</p>
<p>Pastebin</p>
<pre class='brush: lua'> whitelist = {
[234788097] = true,
[321321] = true
}
return whitelist
</pre>
<p>Script</p>
<pre class='brush: lua'>local userids = loadstring(game:Ht... | 101067 | 3 | 113961 | 1 | 1126954614 | Lord_WitherAlt | 206 | 2021-07-08 12:58:52 | <pre class='brush: lua'>local userids = game:GetService("HttpService"):GetAsync("https://pastebin.com/raw/ZAtXUJpu")
if userids[game.Players.LocalPlayer.UserId] then
warn('whitelisted')
else
warn('blacklisted')
end
</pre>
<p>Roblox removed HttpGet and HttpPost long ago and replaced them with HttpService:GetAsyn... |
0 | How Would I Use String.Match To Improve My Chat Command Script? | 366734064 | JeffTheEpicRobloxian | 142 | 2020-09-13 10:28:07 | <p>I've been looking for ways to improve my chat commands script and I came across string.match... I thought it would be useful in my case because instead of me having to type in the targeted player's full username and use find first child to look for something matching that, i could use it and type an abbreviation of ... | 113113 | 1 | 103836 | 1 | 566296650 | raid6n | 2290 | 2020-09-13 14:06:56 | <p>Instead of string.match, you can use string.sub. String.sub gets the substring of a string or a part of a string.</p>
<p>Here's an example:</p>
<pre class='brush: lua'>local String = "Hello!"
local substring = string.sub(String, 1, 5) -- first 5 characters of the string
print(substring) -- "Hello"
</pre>
<p>With you... |
0 | Script is supposed to check if points = 4 then add one win. Why is it not working? | 1044877460 | MariamOMG090 | 9 | 2023-02-25 21:06:26 | <p>Script checks if player is on Red Team, if they are it checks if their points are 4 points if thats true it adds 1 win to them and makes a Frame visible.</p>
<pre class='brush: lua'>local player = game.Players.LocalPlayer
local points = player:WaitForChild("leaderstats"):WaitForChild("Points")
local wins = player:Wa... | 133123 | ||||||||
0 | How to apply a gradient to all guis except core guis? | 1397582780 | kjljixx | 42 | 2021-04-06 21:26:14 | <p>So I want to add a gradient to all of my guis except for core guis like the chat. I am doing this with a loop that loops through all descendants of player gui that are a textbutton, textlabel, and textbox, but it also makes the chat box have the gradient. Is there any way, using scripts, to prevent this?</p>
| 122091 | ||||||||
1 | How do I make a number minus limit? | 914140929 | HiHowAreYah5 | 19 | 2019-06-17 15:54:48 | <p>So I am making a script that lets the player minus the numbers but I was wondering how I could make a limit in how far you can minus the number for example 2000 is the smallest number you can get.
Subtracting script:</p>
<pre class='brush: lua'>z = script.Parent.Parent.VariableZ
vz = script.Parent.Parent.Variable2
f... | 81936 | 1 | 76211 | 1 | 129265755 | Vinceberget | 1405 | 2019-06-17 16:01:02 | <p>Math.clamp could be very useful in your situation.</p>
<pre class='brush: lua'>local value = 12
print(math.clamp(value, 20, 50))
</pre>
<p>The first argument is the input value. The second argument of the <em>clamp</em> function is the minimum number, if the value is smaller than the minimum it will return the minim... |
0 | why is there an attempt to index nil with 'Name' error? | 641796394 | fullguyblox3 | 69 | 2021-04-10 18:00:21 | <pre class="brush: lua">t = {}
script.Parent.Parent.Activated:Connect(function(g)
local t = game.Players:FindFirstChild(g.Name)
t.leaderstats.Thirst.Value += 4
end)
</pre>
<p>i searched on the first page of google and i couldnt solve it.
some solutions led me to another error "argument 1 missing or nil"</p>
<pr... | 122238 | ||||||||
0 | How can I make a tool do something different when activated a second time? | 20398840 | minikitkat | 687 | 2015-05-07 21:46:17 | <p>So i am making a fishing pole that casts a line through making them transparent and then not again. So this works great but my problem is, when I want the tool to be activated again after its initial activation, I want the line to real back in. But I don't know how I could make it so the tool can be activated, then ... | 17345 | 2 | 20734 | 0 | 29413559 | alphawolvess | 1784 | 2015-05-07 22:22:15 | <p>There is a very simple way you can do this. Here is one way, there may be others.</p>
<p>You could put an IntValue or NumberValue in this tool, then name it "Equips" or whatever you'd like. Then on equip, add 1 to the value, then check with an <code>if</code>. You will want to subtract 1 from the Value on the second... |
1 | How do I fix my release mouse on key press script? | 941378754 | LAVA_9799 | 9 | 2022-11-16 18:57:55 | <p>I'm trying to make a script that allows the player to release their mouse when they press "R", but it's not working. I'm using an IntValue (parented to the script) as a detection mechanism (if the value is 0, then it's false. If the value is 1, it's true,) I don't need anybody to rewrite the script, I just need to k... | 132294 | 3 | 119519 | 0 | 559514967 | T3_MasterGamer | 1017 | 2022-11-21 12:09:10 | <p>Try checking if player pressed R first before checking if <code>IsReleasing</code> is 0 or 1 instead of checking them both at the same time. I recommend using BoolValues instead cuz if the number was changed to 2 or any other number for some reason, the script wouldn't work unless putting it back to 0 or 1. And I al... |
0 | Is it possible to make seprate player lists For diffrent gamemodes and How? | 2897206 | ZincPlays | 0 | 2014-02-23 14:17:07 | <p>How would i go about making Seprate playerlists for the diffrent gametypes i will make on my game?</p>
| 256 | ||||||||
0 | [Solved] Can somebody help me here? | 24031098 | ImmenseKassing | 120 | 2014-03-12 17:31:21 | <p>Okay, so here's my script:</p>
<pre class="brush: lua">playerCount = {}
Players = Game:GetService("Players")
Players.PlayerAdded:connect(function(Player)
table.insert(playerCount, Player.Name)
print(table.concat(playerCount, ", "))
end)
Players.PlayerRemoving:connect(function(Player)
table.remove(playerC... | 648 | 1 | 1035 | 2 | 19566737 | Unclear | 1776 | 2014-03-12 17:39:15 | <p>You're using an array-based table. This is a table with only numeric keys.</p>
<p><code>table.insert</code> and <code>table.remove</code> are functions that affect arrays, so naturally they would require numerical keys as inputs.</p>
<pre class="brush: lua">table.insert(tableReference [, targetIndex], value)
table.r... |
0 | I'm trying to make an animated sword, but its animation never runs, why? | 160399649 | genilsonotavio | 132 | 2021-02-22 21:43:07 | <p>I made several attempts to make an animated tool, but for some reason, the animations that I put in them never run, even if the code executes them.</p>
<p>My last most desperate attempt was to use a RemoteEvent, but it still doesn't work.</p>
<p>LocalScript</p>
<pre class='brush: lua'>local Player = game.Players.Loc... | 120531 | 2 | 109908 | 0 | 1085356580 | LeedleLeeRocket | 1257 | 2021-02-22 22:22:07 | <p>It's not working since the sword isn't part of the humanoid rig. You have to pop an AnimationController into the sword and animate it individually.</p>
|
0 | mainmenu/on works but not mainmenu/off, can someone help? | 56684765 | Wrongmistake | 0 | 2014-04-17 11:54:01 | <p>So I have a script where if you say mainmenu/on, or off, it will make the mainmenu pop up. Well for some reason when I tested it I said "mainmenu/on", it worked, but when I tried mainmenu/off, it did not go away. Can someone fix this? Here's the script, if you could please?</p>
<pre class='brush: lua'>local function... | 2414 | 2 | 3335 | 0 | 1423544 | Asleum | 135 | 2014-04-17 12:34:56 | <p>It's just a problem of misplaced end's. Try this :</p>
<pre class='brush: lua'>local function onChatted(msg, recipient, speaker)
local msg = msg:lower()
if msg == "mainmenu/on" then
if not speaker.PlayerGui["ScreenGui"].Frame.Visible == true then
speaker.PlayerGui["ScreenGui"].Frame.Visible = true
end
elseif msg == ... |
1 | How do i detect if a part is in the air? | 849198397 | jdm4llfem8 | 94 | 2020-05-05 07:41:51 | <p>I made a car and i want to print when the car is in the air. I tried making it so when it touches a part, it prints that it touches and if it stops touching, it also prints something but that's not a good way. anybody know a better way? thanks</p>
| 101964 | 1 | 94208 | 0 | 32284241 | oilkas | 364 | 2020-05-05 07:52:47 | <p>You can use raycasting, try this:</p>
<pre class='brush: lua'>local Car = script.Parent -- Put this script in the car model.
local PrimaryPart = Car.PrimaryPart -- Set a primarypart of the car.
local Minimum = 10 -- Minimum height to register when the car is in the air.
while wait() do
local Position = PrimaryPa... |
3 | What is the difference between Lighting and ServerStorage? | 24031098 | ImmenseKassing | 120 | 2014-04-10 20:34:05 | <p>Okay, so I read on the wiki that ServerStorage and ReplicatedStorage are meant to replace Lighting.</p>
<p>What are the benefits of using then instead of Lighting?</p>
<p>What's really the difference between them?</p>
| 1185 | ||||||||
0 | how can I make a saving shop system where you can re equip items if youve owned them before? | 1603550530 | verysweatyperson | 8 | 2021-04-27 22:01:01 | <p>I really need help with this system I understand this is not a request site so I would really appreciate example scripts or a link to a different article or full video on it. Thanks.</p>
| 122879 | ||||||||
0 | How do I use Region3 efficiently to see if there are any parts connecting with a part? | 5105679 | xolbStudios | 127 | 2015-02-03 20:36:55 | <p>I'm trying to figure out an accurate way to determine if an Anchored part is touching any other part.
Here is the function I have written so far.</p>
<pre class='brush: lua'>function checkCollisions(part)
local MIN,MAX,RAN,RAD,FLOOR,ROOF = math.min,math.max,math.random,math.rad,math.floor,math.ceil
local pos... | 14724 | ||||||||
0 | How to check if text is lower than 110 seconds? | 2053085708 | plf4wef4ef | 4 | 2023-01-22 16:45:25 | <p>I have a text label that displays a timer and I would like to check whether the timer has reached below 110 seconds this is my script to play a tween if the timer is below 110.</p>
<pre class='brush: lua'>if TimerLabel.Text < "110" then
tween:Play()
else
print("timer is not under 110 seconds")
end
</pre>
| 132909 | 1 | 120046 | 1 | 15438711 | pwx | 1546 | 2023-01-22 21:18:40 | <pre class='brush: lua'>if typeof(tonumber(TimerLabel.Text)) == 'Number' then
if tonumber(TimerLabel.Text) < 110 then
tween:Play()
else
print('timer is not under 110 seconds')
end
end
</pre>
|
0 | Text inside gui doesn't become visible when it's supposed to? | 1261252204 | Office_Bucket | 23 | 2022-05-04 12:39:36 | <p>In my game I have a gui and a localscript that acts as the main menu and it plays a little camera movement in the script blah blah but then at the end where it's supposed to make text in the gui visible, it doesn't work. Script below.</p>
<pre class='brush: lua'>local camera = game.Workspace.CurrentCamera
gui = game... | 129908 | ||||||||
0 | Police AI? | 5631762 | BuriedBlock | 5 | 2014-02-17 16:16:37 | <p>Hi, I'm learning LUA currently, and I was wondering if it would be possible to create an AI that shoots, and moves around.
My idea would be to have a preset path for it to take.</p>
<p>Example:
Lets say someone is inside a house, taking cover in the bathroom from the police.
The police spawn in, and they stay in the... | 35 | ||||||||
0 | Argument 1 missing or nil on my story game code from Ponchokings ? | 1014156252 | Puppynniko | 1059 | 2022-01-05 09:45:48 | <p>I've tried redoing it in a new baseplate but that does not work, the first time I did this it worked but I accidentally deleted the gameScript now it gives Argument 1 missing or nil</p>
<pre class="brush: lua"> 17:16:52.756 Argument 1 missing or nil - Server - gameScript:10
17:16:52.756 Stack Begin - Studio... | 128708 | 1 | 116544 | 0 | 1704386667 | NotThatFamouss | 605 | 2022-01-05 13:54:06 | <p>You didn't fire the function <code>getRandomPlayer()</code> to get the player's UserId. It was only fired in the challenge example function, which isn't called in the code at all. Try firing it in the other challenge function that got called in the code.</p>
|
0 | Teleport and Universe help | 49316000 | IntellectualBeing | 430 | 2014-02-28 18:53:38 | <p>I want to know how to teleport a local player to a specific game on a touch function.
Saving all there data to that specific place.</p>
<p>Like this (PlaceID,character)</p>
<p>Note( This question is subject to change and have my script installed into it. I can' t access roblox atm.)</p>
| 364 | ||||||||
0 | Why does my local script not fireserver ? | 1498507459 | bruce_matthew | 6 | 2020-10-18 14:52:02 | <p>the local script</p>
<pre class='brush: lua'>local Player = game.Players.LocalPlayer
local mouse = Player:GetMouse()
local T = script.Parent
local handle = T:WaitForChild('Handle')
local debounce = false
local RemoteEvent = script.Parent.RemoteEvent
T.Activated:Connect(function()
local H = T.Parent:FindFirstChil... | 114520 | 1 | 105197 | 0 | 166597845 | DiamondComplex | 216 | 2020-10-18 14:55:43 | <p>The problem is at line 9. You're checking for the 'debounce' to be true when it's currently set at false.
Consider changing the 'debounce' to true. (or debounce == false)</p>
|
0 | How to use os.time() & os.date() and what it does? | 578827989 | momentoflua | 2 | 2018-08-23 15:10:08 | <p>ROBLOX's developer wiki gives some basic information on it (os.date() used to get days/months/years, os.time() can be used to get user's current real life time) however it does not give a lot of information on how to <em>use</em> it.</p>
<p>It would be very helpful if somebody could point me in the right direction o... | 66052 | 1 | 63785 | 7 | 2282833 | chomboghai | 2044 | 2018-08-23 16:06:54 | <p>Using <code>os.time()</code> is pretty straight forward, like it says in the wiki:</p>
<blockquote>
<p>Returns how many seconds since the epoch (1 January 1970, 00:00:00), under UTC time.</p>
</blockquote>
<p><em>Example usage:</em></p>
<pre class="brush: lua">print("It has been " .. os.time() .. " seconds since the... |
1 | Why does this Dev Product script not give value when purchased? | 100172682 | SonGohan6 | 8 | 2020-12-30 18:28:30 | <p>Hey, there!</p>
<p>Thank you for wasting your time out of your day and clicking onto this to maybe help me with this script.</p>
<p>What I'm trying to make is a Dev Product that will give the user (when purchased the product) some leaderstat "strength". My stats handler is located in ServerScriptService, and then th... | 117909 | 1 | 107896 | 0 | 1300267101 | KadenBloxYT | 100 | 2020-12-30 19:12:21 | <p>The script you have given is quite unorganized and needs polishing.</p>
<p>Please refer <a target="_blank" href="/https://www.youtube.com/watch?v=h92s4Xn26oc">to this video</a> created by the Developer Forum Champion, AlvinBlox for help. Alternatively, <a target="_blank" href="/https://www.youtube.com/watch?v=QC2bDZ... |
2 | Will this script work? [Player Points] | 15168146 | biocommand | 30 | 2014-04-26 16:41:44 | <p>Before spending 100rs on a gamepass can someone please tell me if this script works?</p>
<pre class='brush: lua'>local service = game:GetService("PointsService")
game.Players.PlayerAdded:connect(function(player)
player:WaitForDataReady()
service:AwardPoints(GamepassIDHere, service:GetAwardablePoints())
end)
</pre>
| 3604 | ||||||||
0 | Let players choose the server they go into (ex. New York, Illinois, Florida)? | 678319120 | majorpeterson12 | 0 | 2023-01-18 04:03:20 | <p>How does a game like deepwoken allow players to choose which server location they wanted to join.</p>
| 132882 | ||||||||
0 | Purchase Request Advertisement Pop-up? | 407180563 | robloxtitanic584 | 87 | 2021-02-18 21:49:55 | <p>There is a purchase request advertisement pop-up in my game and I've tried to get rid of it by searching "require" and "MarketplaceService" in my scripts and deleted anything suspicious in my scripts and I've also denied any script injection for any plug-ins that I have installed and there is still a purchase reques... | 120335 | ||||||||
0 | Does Roblox Studio have a shortcut option that comments out multiple lines? | 9032943 | quotee1 | 0 | 2017-12-09 22:42:04 | <p>In other programs I am able to comment out large sections of code while testing other alternatives. Does that option exist with studio?</p>
| 50113 | ||||||||
0 | How to check if a player has already picked up a coin? | 1561550920 | tumtindy | 36 | 2022-12-11 16:34:47 | <p>Here's my situation, i've made a coin mesh and added a script to it that makes the coin spin and when picked up makes a sound and adds to the players leaderstats value. It disappears for 5 seconds before regenerating to make a new coin. Is there anyway to make it so if a player picks up a coin they have already pick... | 132536 | ||||||||
1 | When player dies their speed boost ends? | 424448718 | Sxribbly | 16 | 2022-08-04 17:53:34 | <p>I have a dev product that temporarily gives you a speed boost. My problem is that when you die your speed goes back to normal. How can I fix this? Heres the if statement for the devproduct:</p>
<pre class='brush: lua'> if receiptInfo.ProductId == 1289737124 then
print("player bought 30sec speed boost")... | 131097 | 1 | 118429 | 0 | 114964274 | Rogue_Ram | 40 | 2022-08-05 02:09:49 | <p>A simple way to fix this would be to update the player's walkspeed every time the loop ticks as so:</p>
<pre class='brush: lua'>if receiptInfo.ProductId == 1289737124 then
print("player bought 30sec speed boost")
player.Character.Humanoid.WalkSpeed = 40
for i = 30, 1, -1 do -- sets 30 seco... |
0 | GUI that shows only when you own a Gamepass? | 243225718 | 130363 | 67 | 2017-05-16 02:37:07 | <pre class="brush: lua">local id = 808263499
game.Players.PlayerAdded:connect(function(player)
local HasPass = game:GetService("GamePassService"):PlayerHasPass(player, id)
if HasPass then
player:findFirstChild("SpeedUI").Frame.Visible = true
else
player:findFirstChild("SpeedUI"):Destroy()
en... | 42960 | ||||||||
0 | What does the percentage symbol % do in the script ? | 521817714 | AK47GOLDgun | 9 | 2020-10-11 19:26:37 | <p>I've tried finding answers but couldn't find it, can someone tell me what the "%" does so that I can have a better understanding of what others have coded.</p>
| 114259 | 1 | 104889 | 0 | 91099528 | zadobyte | 692 | 2020-10-11 19:30:47 | <p><code>%</code> is a mathematical operator named modulo. It returns the remainder of the division between two numbers. For example:</p>
<pre class='brush: lua'>print(2%2) --prints 0 because 2 goes into 2, 1 time evenly.
print(5%2) --prints 1 because 2 goes into 5, 2 times, leaving 1 behind
</pre>
|
0 | How to set the name in Roblox HTTP request? | 1126557691 | 9mze | 193 | 2022-11-26 04:16:40 | <p>The request responds with "The name is invalid."
I set the name but it doesn't work.</p>
<pre class='brush: lua'>local HttpService = game:GetService("HttpService")
local ServerScriptService= game:GetService("ServerScriptService")
local Http = require(ServerScriptService.Modules.Http)
local request = {
name = "n... | 132385 | ||||||||
0 | LOCAL NPC | nobody can see except the player ? | 1564972967 | Constantdevs | 0 | 2021-05-01 13:13:09 | <p>Hello, I am currently creating a game like gta v zombie but I have a problem, I want to spawn zombies around the player that nobody can see except him</p>
| 122988 | ||||||||
0 | How To Make Touched Event Only Register One Touch? | 353632707 | SuperSM1 | 67 | 2021-08-06 15:29:37 | <p>I want to register one touch on a part so I can put how many people have touched it on a GUI. Right now, it's registering 2 or 3 parts every time I touch it</p>
<pre class="brush: lua">local TPWallLeft = script.Parent.Parent.Parent
local Billboard = script.Parent.Parent
local PlayerGUI = script.Parent
local PlayerCo... | 126165 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.