question_score stringclasses 21
values | title stringlengths 6 119 | question_userid stringlengths 4 10 | question_user stringlengths 3 20 | question_user_score stringclasses 496
values | question_datetime stringdate 2014-02-01 23:57:31 2023-04-02 01:40:15 | question stringlengths 0 11k | question_id stringlengths 1 6 | answer_count stringclasses 8
values | answer_id stringlengths 0 6 | answer_score stringclasses 18
values | answer_userid stringclasses 946
values | answer_user stringclasses 963
values | answer_user_score stringclasses 692
values | answer_datetime stringlengths 0 19 | answer stringlengths 0 10.7k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | What is a way on saving/having items in an inventory? | 436466229 | trecept | 367 | 2018-08-21 08:50:54 | <p>Not asking so much for a script but just guidance on what would be a way to script an inventory for each player that can be saved in datastores.
What I've done previously is have a value for every item in the game inside the player and change the value if it was purchased or not. This doesn't seem good if you have a... | 65928 | 1 | 63703 | 5 | 16542699 | mattscy | 3725 | 2018-08-21 13:23:59 | <p>I love this question :D</p>
<p>What you are looking for are tables (dictionaries specifically). For every player that joins, you can use that player as a key in a dictionary (called PlayerData or something), and then store their data under that key. Then, when you want to retrieve the data stored under that player, ... |
0 | Removing Tools in starter pack? | 86653837 | elms1 | 0 | 2022-06-23 22:47:09 | <p>Hey guys
So I have made a shop system and it works fine, one issue I have is that when you purchase a item it doesn't destroy the tool from the starter pack. Wanna know if there is a code anyone can help me with thanks :)</p>
<p>If anyone could help thanks</p>
| 130484 | ||||||||
0 | How do I move a part with BodyVelocity? | 38036947 | marioblast1244 | 113 | 2017-05-31 21:54:35 | <p>I have asked about how I could move a part with a script, but they told me to use <code>BodyVelocity</code>. How do I even use <code>BodyVelocity</code>? Anyways, here is what I learned:</p>
<pre class='brush: lua'>local Cannon = script.Parent
local CannonBody = Cannon.Union
local Cannonball = game.Workspace.MiniGam... | 43445 | ||||||||
0 | LookVector is not a valid member of Vector3? (help) | 1447141672 | TakeItToTheM | 0 | 2022-04-17 20:14:15 | <p>I want this ball to go in front of me, but then it gives me an error saying " LookVector is not a valid member of Vector3 - Server - Script:7"</p>
<p>Any fixes? Thanks.</p>
<pre class='brush: lua'>local ball = game.Workspace.Part
local wastouched = false
ball.Touched:Connect(function(hit)
if hit.Parent:FindFir... | 129708 | ||||||||
0 | Can you do absolute value in lua? | 13667373 | EzraNehemiah_TF2 | 3551 | 2015-03-08 15:48:49 | <p>If you do <code>print(|-3|)</code> would it print 3? I tried this once and it didn't work, but I still think there is a way to find absolute value. I want it to be simple and not like:</p>
<pre class='brush: lua'>local number = {-4, 4, 5, -98}
for _, num in pairs(number) do
if num > 0 then
num = num*-1
... | 15597 | ||||||||
1 | How would I go by making a script for a no - damage zone? | 1530504742 | epic_hen9 | 25 | 2021-04-05 12:21:29 | <p>I have tried to write gear removers but they haven't worked. I wanna know how i would go by making a block that would make it so that you can't deal any damage with a sword.</p>
| 122031 | 1 | 111144 | 0 | 226832508 | MattVSNNL | 133 | 2021-04-05 12:27:35 | <p>Try this</p>
<p>Add a script into the part</p>
<pre class='brush: lua'>script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.Humanoid.MaxHealth = math.huge
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.MaxHealth
end
end)
script.Parent.TouchEnd... |
0 | How to know the index of a tool in a players inventory? | 264859050 | Nonaz_jr | 439 | 2018-04-05 06:14:36 | <p>I want to find out and/or set the number that a tool is assigned to in inventory.</p>
<p>For example, the first tool is put in slot 1 (with hotkey 1), etc up to slot 10 (with hotkey zero), and the rest goes into the extended backpack with positions 11+.</p>
<p>Dropping a tool does not move other tools into a lower s... | 56247 | ||||||||
0 | Interfering functions? | 8895155 | truefire2 | 75 | 2014-02-20 13:15:54 | <p>Hello. I've created a timer, but when I put the respawn function in, it breaks the timer. Without the respawn function, it works fine! Also, the respawn function is faulty and spawns players in random places even though the teamcolours and spawn teamcolours match.</p>
<p>Help please?
OUTPUT:
attempt to index field '... | 160 | ||||||||
0 | [SOLVED]attempt to index nil with 'Rgboffical_yt' How Do I Fix This? | 997283098 | Rgboffical_yt | 40 | 2020-06-30 03:18:38 | <p>so it keeps giving me a error saying:
attempt to index nil with 'Players'
How Do I Fix It?
here is The Code</p>
<pre class='brush: lua'>--Variables--
local client = game.Players.LocalPlayer
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")--gets ReplicatedStora... | 107816 | 1 | 99109 | 1 | 1110149261 | iivSnooxy | 248 | 2020-06-30 04:38:08 | <p>Maybe try</p>
<pre class='brush: lua'>local Players = game.Player.LocalPlayer
</pre>
<p>Or</p>
<pre class='brush: lua'>local Players = game.Players.LocalPlayer
</pre>
<p>in line 3
Please accept and Upvote if helped!</p>
|
0 | How to get a character's head picture? | 109383927 | Async_io | 908 | 2018-05-29 03:49:11 | <p>Bit of a goofy question I suppose, but I can't seem to find the answer.</p>
<p>Now I know that you can get a player's <strong>avatar</strong> picture by using <code>http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=150&Format=Png&username=</code>, but I don't want the player's avatar. I want the picture o... | 59216 | ||||||||
0 | How to make a hunger, thirst, and energy script? | 49674433 | BreBreGaming | 10 | 2014-04-13 11:32:22 | <p>I was trying to make a hunger thirst and sleep/energy script for my character, but it wouldn't work. I was also trying to make so if there is a gui on the screen, it will pop above the gui. But i don't know how to do that, so if you know how please tell me.</p>
<p>My script:</p>
<p>while wait(math.random(13,17)) do
... | 1276 | 1 | 1728 | 0 | 35708167 | Marolex | 45 | 2014-04-13 11:48:02 | <p>You should try using number values and use a math equation to convert the value into the Guis size. Doing so will allow other scripts to read the Gui and for a much more efficient system.</p>
|
0 | Why Is The Weapon Hold Animation Playing When I Unequip The Weapon? [UNSOLVED] | 107699267 | Puffyjasonrocks84 | 39 | 2023-02-17 01:22:07 | <p>I am making a zombie game with custom guns and animations made by me the animations play just fine but I’m having trouble scripting when the animations actually play this is my first time making and scripting animations here is my code, Thanks:</p>
<pre class='brush: lua'>local player = game:GetService('Players').Lo... | 133082 | ||||||||
0 | Problem with a Local Script for a hopperbin, how to fix this? | 30119929 | thejeterman | 0 | 2014-06-10 07:57:20 | <p>This is the part of the script</p>
<pre class='brush: lua'>function IfInactive()
if script.Parent.Active == true then -- line 67 on the script
local Player = game:GetService("Players").LocalPlayer
local Cam = game.Workspace.CurrentCamera
for _, Model in pairs(Cam:GetChildren()) do
if Model.Name == "Arms" the... | 6455 | 1 | 8543 | 1 | 17514438 | TheeDeathCaster | 2336 | 2014-06-10 11:43:30 | <p>You used 2 <code>ends</code> instead of 4 by how I'm looking at the script, try adding two more <code>ends</code> to the script, the error may not come up, but if there is still a problem just PM me on Roblox (On TheeDeathCaster) and I'll see what I can do.</p>
|
1 | Not Changing Leaderstats and Text Value if Gamepass? | 371291236 | Rynappel | 212 | 2020-01-14 04:45:22 | <p>I have a local script located in a textlabel and its supposed to change the text if the player has a gamepass then its supposed to say <code>0/Infinite</code> (the zero is the value of Jump) if they have the gamepass and if they dont have a gamepass then it will show <code>0/0</code> (the zeros is the value of Jump ... | 93021 | ||||||||
0 | How do i Mold a Sword on a Players Back? | 45209912 | justintubba123 | 6 | 2017-12-24 19:45:44 | <p>I am making a game and i want it so when you step on a brick it puts a sword on your back. The script i have now is buggy and rotation is off every time, so can anyone help fix it. The sword is a union. I want the sword slanted when it is on your back.</p>
<p>Script:</p>
<pre class='brush: lua'>local De = false
scri... | 50864 | ||||||||
0 | Fireserver can only be called from the client???HELP | 547784746 | Lamborghinihurican0 | 2 | 2020-08-12 20:14:22 | <p>I am currently making a game and my script wont work any help at all please???
here is my script</p>
<pre class='brush: lua'>TP = script.Parent -- this script is a server script if that helps
gamie = game.ReplicatedStorage.Game
TP.Touched:Connect(function(touch)
local RP = game:GetService("ReplicatedStorage")
... | 111241 | 1 | 102117 | 0 | 94203834 | AswormeDorijan111 | 531 | 2020-08-12 20:29:01 | <p>When you are trying to communicate with 2 server-sided scripts you have to use an instance called "Bindable Event".</p>
<p><strong>First server-sided script</strong></p>
<pre class='brush: lua'>TP = script.Parent -- this script is a server script if that helps
gamie = game.ReplicatedStorage.Game -- Make Game bindabl... |
0 | My Carry Script is creating errors but, I can't fix them. Is there anyway to fix this? | 1169362290 | iiMxtt_Destinyii | 62 | 2020-05-06 07:45:05 | <p>Hello, I am trying to achieve a carry system for carrying players like in Adopt Me, It's been going good good up until the weld part. I have never used welds so, I looked at some previous methods and tried but none of them seemed to work.</p>
<p>This is all the code, I have so far:</p>
<pre class='brush: lua'>local ... | 102092 | ||||||||
1 | How can I shorten a long and repetitive block of code? | 332695720 | nafey200 | 52 | 2021-04-19 09:34:06 | <p>I just copy and pasted my timer. I was hoping there would be a loop or something that I don't know about. My code would go something like this:</p>
<pre class='brush: lua'>function ValueCountDown ()
NumberValue.Value = 7
NumberValue.Value = NumberValue.Value - 1
NumberValue.Value = NumberValue.Value - 1
NumberValue.... | 122550 | 2 | 111654 | 1 | 1251627904 | CodeWon | 121 | 2021-04-19 11:46:18 | <p>A <a target="_blank" href="http://developer.roblox.com/en-us/articles/Loops">For-Loop</a> would be useful</p>
<pre class='brush: lua'>for count = 1,10,1 do
-- Code
count - count-1
end
</pre>
<p>The count is just a variable, you name it what ever you want. As a video I watched said-S.E.I.
The first 1 is where... |
2 | [SOLVED] How to run a function once in Object-Oriented Programming? | 559514967 | T3_MasterGamer | 2189 | 2022-08-20 06:36:50 | <p>Hello. I'm trying to make my own <strong>Custom Signal</strong> module without using BindableEvents nor using a module from the DevForum. But I don't know how to make the handler <code>Signal:Once()</code> which basically uses Connect but only does it once. I tried using coroutines, debounce, and setting the functio... | 131284 | ||||||||
1 | Is there a way to make a script that detects when its hit by a specific named block? | 847431372 | Student20986 | 0 | 2021-02-22 14:15:24 | <p>Basically, I am trying to make a script that will activate a section of code whenever a specific part touches the part.</p>
<p>I am new to scripting so this is basically all I got.</p>
<pre class='brush: lua'>if workspace.specificpart.Touched then
workspace.doors:Destroy ()
end
</pre>
<p>Does anyone know how to ... | 120515 | ||||||||
0 | How do I Rotate the model with CFrames while Changing its position also? | 923980615 | smash_abIe | 19 | 2022-10-30 18:16:49 | <p>Here is my current code</p>
<pre class='brush: lua'><br />local function summonWave(player, playerPos)
local clonedAbility = ability:Clone()
clonedAbility.Parent= workspace
local rootPart = clonedAbility.PrimaryPart
clonedAbility:SetPrimaryPartCFrame(CFrame.new(player.Character.PrimaryPart.Position +... | 132088 | ||||||||
0 | Gus buttons overlapping in scrolling frame. Why? | 364796628 | Funnyskyswagway3 | 30 | 2023-01-24 00:44:32 | <p>This script works completely fine and it may be the scrollingframe itself but when the buttons are parented to the scrolling frame which has the “UIList” the buttons overlap each other and aren’t in a list format. (This script is a chat autofill script)</p>
<p>Example: https://streamable.com/03dhtp (Copy link and pa... | 132927 | ||||||||
0 | How do you change the background colour of a UI? | 83827805 | KingDomas | 148 | 2022-05-01 17:59:26 | <p>SOLVED - Check answers.</p>
<p>I am trying to create a darkening effect on a button when you press on it, similar to that of roblox's AutoButtonColor property. However, when I try to set the background colour (backgroundcolour3), it immediately changes to white, no matter the input in the parameters. Here's my local... | 129881 | ||||||||
0 | How do I use Clone()? | 33035751 | NecoBoss | 194 | 2014-06-18 01:39:11 | <p>I am trying to make a clone of a part in server storage. How do I accomplish this?</p>
| 6850 | ||||||||
0 | How to access a GUI in a script | 19045513 | MrBriantacular | 10 | 2014-02-19 21:31:12 | <p>I'm trying to make a GUI pop up when you step on this brick, holding a gun.
I already have the GUI, and the script (Thanks MrNicNac), but I don't know how to access the GUI. Here's the script:</p>
<pre class='brush: lua'>local toolname = "Luger, Colt 45"
script.Parent.Touched:connect( function(hit)
if hit.Parent th... | 125 | ||||||||
0 | How to execute a ProximityPrompt script that destroys the item you have equipped? | 115589511 | superbubba2020 | 6 | 2021-05-04 23:04:42 | <p>I'm trying to make a Trashcan that has a Proximity Prompt, that let's you destroy the tool that you have currently equipped. I need help finishing this script.</p>
<p>local KeyPart = script.Parent
local Prompt = KeyPart.ProximityPrompt</p>
<p>Prompt.Triggered:Connect(function(player)
local bp = player.Backpack
if bp... | 123105 | 2 | 112179 | 0 | 291424954 | NGC4637 | 227 | 2021-05-04 23:43:48 | <p>edit: nvm i see you are doin something different</p>
<pre class='brush: lua'>local KeyPart = script.Parent
local Prompt = KeyPart.ProximityPrompt
Prompt.Triggered:Connect(function(player)
local chr = game.Workspace:FindFirstChild(player.Name)
if chr:FindFirstChildWhichIsA("Tool") then
chr:FindFirstCh... |
0 | Prompt a gamepass purchase using SurfaceGUI TextButton? | 354979819 | WesleyAng_3 | 128 | 2021-04-06 10:28:05 | <p>Script:</p>
<pre class='brush: lua'>local MarketplaceService = game:GetService("MarketplaceService")
local ProductID = 16498748
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
MarketplaceService:PromptGamePassPurchase(player, ProductID)
end)
</pre>
| 122065 | 3 | 111261 | 1 | 896379702 | wwwaylon09 | 22 | 2021-04-07 23:03:52 | <p>I wouldn't recommend using a local script in the server. You should use a RemoteEvent to communicate from the server to client.</p>
<p>Server Script:</p>
<pre class='brush: lua'>local Event = game.ReplicatedStorage.Event --RemoteEvent in ReplicatedStorage
local ClickDetector = game.Workspace.Part.ClickDetector --Cli... |
2 | How to move a part using a script? | 1568636732 | mr_maker231 | 14 | 2020-05-05 14:23:49 | <p>I want to make a moving spotlight. Please tell me how to move and rotate a part using a script.</p>
| 101988 | 3 | 94241 | 0 | 1575849153 | Borrahh | 265 | 2020-05-05 14:45:20 | <p>I would suggest you to Google Basic Stuff, to understand them Better.</p>
<p>Firstly, You need to locate it, Your Part must be in the workspace.
So you locate it with:</p>
<pre class='brush: lua'>game.workspace.Part.CFrame = CFrame.new(4, 6, 5)
</pre>
<p>On The Parameters CFrame.new(You write here where you want the... |
1 | Rotating the torso without mouselock or first person getting in the way? | 1312116 | MrFlimsy | 345 | 2014-02-21 21:57:03 | <p>I have a tool that uses welds to animate the player's limbs. There's a certain ability I'd like to make that requires the player's torso to rotate 90 degrees - however if I'm playing in MouseLock or first person mode, the torso refuses to rotate. I can't anchor the torso because, due to the way I have the welds for ... | 208 | ||||||||
0 | Cash giver resets my cash amount? | 234143140 | MexheCo | 46 | 2018-11-30 20:55:11 | <p>[EDIT] It is now adding the cash by 100. Say I have 17 dollars, and I click the ATM. I now have 100. If I were to spend all the money, and then click the ATM, I would have 200.</p>
<p>I have an ATM that, when clicked, gives the player 100 cash. However, it does not take the cash you already have and add 100 to it. I... | 71389 | ||||||||
1 | How do you change the positon of a model? | 146100287 | Gigaset39 | 87 | 2022-09-17 14:44:06 | <p>I just realized that i cant move models,just parts, so i could ungrop all the 6 part and move them individualy, but i dont want to do that, soo...</p>
<p>How i move a <em>Model</em>?</p>
<p>i use this for parts:</p>
<pre class="brush: lua">for i = 1,50 do
Robloxian.Position += Vector3.new(0,1,0)
wait... | 131649 | ||||||||
0 | Can you change player speed to 0 using for i,v in pairs()? | 297686735 | Friskyman321 | 106 | 2020-05-27 21:05:00 | <p>hi, im kinda struggling on this script like when i use for i,v in pairs on the humanoid.WalkSpeed, the speed wont change to 0, idk why am i do it wrong or should i not using for i,v in pairs? heres the script</p>
<pre class='brush: lua'>for i,v in pairs(game.Players:GetPlayers()) do
local char = v.Character
... | 104555 | ||||||||
2 | Does a PhysicsStepped event exist? | 2479393 | Dfzoz | 345 | 2020-09-16 02:25:17 | <p>I was creating a golf game some time ago but I stopped working on it because I couldn't create a wind factor that is precise. I would like to know if there is an event that fires along with every physics update so I can maybe add it.</p>
| 113216 | 2 | 103940 | 1 | 9552668 | SteamG0D | 1489 | 2020-09-16 04:21:48 | <p>Fifkee is wrong, you never want to do any physics related updates with RenderStepped, that should be reserved for camera manipulation only! Even in the link he provided, it shows that the physics simulations happen after the render occurs. If you do decide to use RenderStepped for everything, your game will have low... |
0 | Roblox bird veiw camera angle script? | 937789704 | bossaboy777 | 0 | 2021-02-21 01:57:59 | <p>how do i make my camera veiw a birds like veiw</p>
| 120444 | ||||||||
0 | GetTouchingParts not returning the parts intersecting? | 91990834 | Hvxbyte | 0 | 2015-09-02 19:17:12 | <p>Okay; so I'm working on a strategy game revolved around territorial control, and upon a player's join, a capital will be created for them, if it doesn't already exist... now, given that the capital spawns, it's supposed to check if any 'Fog of War' parts intersect with the territory itself, if so, destroy them... I'... | 22255 | ||||||||
0 | Random Player Chosen, interval is empty error? | 25842304 | bloxxyz | 274 | 2014-04-12 19:46:21 | <p>Hi, I'm not sure what the error means, and I can't quite figure it out. I asked the Scripting Helpers forum at ROBLOX.com, and I did get some help, but they couldn't help me figure it out either.</p>
<p>The script's objective is to choose a random player, and call out its name in a Hint. Here is the script, and this... | 1251 | ||||||||
0 | The best way to datastore customizable tools? | 14298427 | kakikito123 | 4 | 2018-04-20 17:46:58 | <p>I have an inventory system in my game, and the tools you are able to get can be upgraded, customizable, etc.. How would I go about saving each player's customization to their tools? Would I make other datastore keys? Or add more int values to specify what customizations they have in each thing or whatnot? For now I ... | 57131 | ||||||||
0 | anybody know why this local variable isnt working? | 40807098 | coda6000 | 2 | 2022-08-05 16:09:31 | <pre class='brush: lua'>local Humanoid = Player.Character:WaitForChild("Humanoid")
</pre>
<pre class='brush: lua'>Players.coda6000.PlayerScripts.Sprint:5: attempt to index nil with 'WaitForChild'
</pre>
<p>this is the error i get in my output</p>
| 131110 | ||||||||
0 | How do I make it so if the GetGroupInfoAsync() fails that it will move on and choose a new id? | 36937229 | JohnerDev | 27 | 2021-04-06 01:35:18 | <pre class='brush: lua'>local Button = script.Parent
local frm = script.Parent.Parent.Parent.Group
frm.Visible = false
function onClick()
local rank=frm.Ranks
local max = script.Parent.Parent.MaxTextBox.Text
local min = script.Parent.Parent.MinTextBox.Text
local frm = script.Parent.Parent.Parent.Group
... | 122052 | ||||||||
0 | How to render only specific places at once? | 979283405 | Lagfss | 0 | 2022-07-30 21:59:36 | <p>I have a massive map that causes lag issues because some islands require more process-heavy scripting than the others. The map is basically a giant sea with islands in it. Is there a way I can only render in one island where the player is near or currently on while the others remain unrendered not affecting lag issu... | 131021 | ||||||||
0 | How To Make Dropped Cash Only Can Claimed By Other Player? | 600684309 | Hiktius | 7 | 2023-03-04 12:05:05 | <p>Sorry For Bad English, I Am Making Script That When You Triggered Prompt, You Will Get Billboard Gui With "Wanted" Text On Head, And Need To Hide Until 100 Seconds Pass To Get Money, And If You Dies, You Drop The Money That You Got From Robbery, And Other Player Can Claim It But Problem Is That I Can Claim It too, A... | 133140 | ||||||||
2 | Must be a player object? | 1341499453 | sonichfan | 62 | 2021-06-09 12:25:31 | <pre class="brush: lua">script.Parent.Touched:Connect(function(hit)
if hit.Parent.Humanoid then
game.ReplicatedStorage.ShowExitCar:FireClient()
end
end)
</pre>
<p>it says fire client: player argument must be a player object</p>
| 124218 | 3 | 113248 | 2 | 40647669 | DrShockz | 233 | 2021-06-09 13:09:21 | <p><strong>Hello,</strong></p>
<h2>It seems as if you've incorrectly used the <code>:FireClient()</code> event!</h2>
<p>No worries though as I'll teach you today how to use the <code>:FireClient()</code> event!</p>
<h2><strong>FireClient</strong></h2>
<p>Below is an example of how to send an argument to a specific clie... |
0 | Make a player walk on walls? | 33666987 | XDgirl909090 | 143 | 2018-02-12 23:18:25 | <p>Hello! I am attempting to make a script so that when a player touches a brick, they can walk on the wall. I'm not sure if this is the best way, but im trying turn the players z axis without them flipping back up.</p>
<p>This is the code that I have:</p>
<pre class='brush: lua'>script.Parent.Touched:connect(function(... | 53638 | 1 | 52825 | 0 | 32716687 | Professor_Boxtrot | 121 | 2018-02-12 23:28:18 | <p>The easiest way to do this is to use CFrame, as I stated in my comment.</p>
<p>CFrame is a type of data that holds orientation and position, and it doesn't kill the player upon use. Try this:</p>
<pre class='brush: lua'><br />script.Parent.Touched:connect(function(hit)
local player = hit.Parent
player.Torso.... |
0 | .Changed event firing twice? | 959426026 | xX02Dire_Wolf20Xx | 11 | 2022-06-14 00:51:06 | <p>So im trying to make an event that happens whenever a certain time of the day comes, and I'm just testing the .Changed event. Whenever the clocktime changes for some reason the message is printing 2x each time? Also iis there a better way to fire an event when the ClockTime changes?</p>
<pre class="brush: lua">game.... | 130352 | 1 | 117713 | 1 | 295750059 | SuperLittleAdmin | 257 | 2022-06-15 03:00:00 | <p>This is because Lighing has multiple properties that can change at the same time, such as <code>ClockTime</code> and <code>TimeOfDay</code>.</p>
<p>Instead, try using <code>:GetPropertyChangedSignal()</code>, this would only fire if the property mentioned change, and not all property.</p>
<pre class="brush: lua">gam... |
0 | [SOLVED] How to make part that alters the appearance of tools? | 118061211 | jacksworld2808 | 15 | 2020-04-19 05:06:14 | <p>How would I make it when a player touches a part with a tool in their hand the tool will be altered.</p>
<p>I am trying to make it so when you hold an empty coffee pot in your hand and go to a coffee machine, the coffee which has its transparency set to 1 becomes 0 so you can see it, as well as the name being change... | 99835 | 1 | 92209 | 0 | 402731422 | ThisIsAnAccount255 | 143 | 2020-04-19 05:23:23 | <p>Any tool that you're holding is inside of your character. You can use <code>Part.Touched</code> to detect if a player goes to the machine. A nice example would be this</p>
<pre class='brush: lua'>local function fillcup(cup)
if cup.Filled.Value == false then --checks if the cup is filled
cup.Filled.Value ... |
0 | How would you make an Image Label Spin Around? | 233224360 | mastercheeseit | 60 | 2021-01-12 19:31:46 | <p>So just you know there is spining coins i want to make an image with coins that spins around like thoose coins that spin and u collect them for coind so thats how i want to make so if i earn cash it shows an image labek that shows coin spin around here is an example of https://youtu.be/J2GrKw2ocLg at 3:30 see how i ... | 118605 | ||||||||
0 | Backpack event | 42347297 | xXPowerBladeXx | 5 | 2014-03-13 16:13:02 | <p>Is there any event that runs when an item is added to the backpack?</p>
| 665 | ||||||||
0 | Hi how do I instance a model? | 44648362 | iznr | 0 | 2019-04-20 02:11:28 | <p>Thanks</p>
<p>I'm not sure how to do</p>
| 79221 | ||||||||
0 | Saving and Loading a Player's Position? | 421168132 | Notrealac0unt | 19 | 2018-12-23 17:15:12 | <p>So for three days now (Not on the whole game just the save & load) I've been working hard on a Roblox turn based RPG. It came to my attention players would need to save and load there game data. So I've read around on DataStores and how to convert CFrame values to a DataStore. But nothing seems to be working.<br... | 72811 | ||||||||
0 | Making Character Model Match Local Player? | 358294883 | LegoUnicornRoblox | 37 | 2019-08-19 02:31:42 | <p>Hello, I'm quite a experienced scripter, yet I am struggling in how to make a blank player model in the game's workspace match the player locally.</p>
<p>I've tried cloning the player's clothes and placing them into the model (local script)
But I can't figure out how to get the hats and all that stuff, and for using... | 86127 | ||||||||
0 | my health bar is not working and i really need help. any comments? | 434616561 | EncryptedThunder | 0 | 2022-06-16 18:36:13 | <p>problem:
<a target="_blank" href="http://">https://i.gyazo.com/f41e08efd30553ac79426e55374934be.gif
</a></p>
<p>the health bar just acts really weird and i have no idea how to fix it</p>
<p>pls help</p>
<p>script:</p>
<pre class='brush: lua'>local player = game.Players.LocalPlayer
local character = player.Character ... | 130372 | ||||||||
0 | Checking if a Player is dead.? | 430874503 | stickymirro511 | 61 | 2020-09-08 01:07:02 | <p>Hi, I'm trying to make a script so that if they buy a dev product they get a coil, but if they die, they get the coil again. No matter what I do I can't get it to award the coil when they die. I don't want to use a game pass though.</p>
<pre class='brush: lua'>local MarketplaceService = game:GetService("MarketplaceS... | 112855 | 4 | 103593 | 2 | 118343046 | Elyzzia | 1289 | 2020-09-08 02:12:48 | <p>if you want a player to keep gear after they die, you can put it inside their StarterGear so they respawn with it</p>
<pre class='brush: lua'>game.ServerStorage.cool:Clone().Parent = player.Backpack
game.ServerStorage.cool:Clone().Parent = player.StarterGear
</pre>
<p>keep in mind, you <em>have</em> to clone it into... |
0 | Why is this SetPrimaryPartCFrame not working? [CLOSED] | 125514587 | MHaven1 | 159 | 2016-08-17 23:23:06 | <pre class="brush: lua">script.Parent.MouseButton1Click:connect(function()
game.Workspace.model:SetPrimaryPartCFrame(game.Workspace.model.PrimaryPart.CFrame)
end)
</pre>
<p>i dont know if this is right but this isnt working.
i would appreciate any help from you guys
thank you.</p>
| 34671 | ||||||||
0 | Why is HumanoidRootPart attempt index nil? | 282163189 | eyangmich1234567890 | 0 | 2022-06-19 14:32:34 | <p>i've been using bodyGyro to point my Tower to Enemy using HumanoidRootPart but it index nil. it was working before bodyGyro so I'm guessing it's something in the bodyGyro part. I can't seem to find where the error originated. The Debugger said the error is in the "local distance = (target.HumanoidRootPart.Position -... | 130404 | ||||||||
0 | How do I kick a player once they have 0 points? | 173897241 | salaarkhan1 | 28 | 2022-07-29 06:50:54 | <p>I am making a 'limited words' based game, and trying to kick a player when they have 0 points. For some reason, it wont work. Can anyone help? Here is the script;</p>
<pre class='brush: lua'>game.Players.PlayerAdded:Connect(function(player)
if player.leaderstats.Points.Value <= 0 then
player:Kick("You... | 130988 | 1 | 118346 | 0 | 295750059 | SuperLittleAdmin | 257 | 2022-07-29 07:46:19 | <p>Your current code only checks if the player’s point is 0 <strong>once</strong> when they just joined. Instead try checking every time their point changes.</p>
<pre class='brush: lua'>local Players = game:GetService('Players')
Players.PlayerAdded:Connect(function(player)
local pointsValue = player.leaderstats.Poi... |
0 | how do i make it so when you touch the scripts parent it starts shrinking? | 375590370 | overloadspartan | 0 | 2022-02-19 06:46:49 | <p>i tried to do it on my own but it doesnt work im new to scripting</p>
<p>local player = game:GetService("Players").LocalPlayer
script.Parent.Touched:Connect(function(hit)
if hit.Parent == player.Character then
script.Parent.Size = script.Parent.Size - Vector3.new(0.25,0,0.25)
end
end)</p>
| 129038 | ||||||||
0 | How Do I Make A Sit Script? | 11246722 | tanzane | 100 | 2014-11-28 20:47:23 | <p>I'm trying to make one of those "Get Eaten" games but I don't know how to make a script where you sit down when you touch the "Giants" tongue. Though I assume it'd probably go into a function. Sorta like this?</p>
<pre class='brush: lua'>function sit()
end
script.parent.Touched:connect(sit)
</pre>
<p>I don't know wh... | 12828 | ||||||||
0 | How do I make a welcome GUI that only shows when an owner/co-owner joins? | 1550705062 | tvx_ler | 0 | 2021-01-12 22:08:32 | <p>So, I have followed a simple tutorial on how to make a gui that will appear for 3 seconds saying "(user) has joined the game!". But, I want this only to show when an owner/co-owner has joined.
Their ranks are 254, and 255 in my group. The gui itself works perfectly fine, and I have a basic knowledge of scripting. Bu... | 118609 | ||||||||
0 | How can I give myself an admin badge on the player list? | 114240347 | OkxieCorey | 125 | 2018-09-02 21:50:41 | <p>I've seen admins on ROBLOX get cool badges on the side of the screen, I've seen a lot of Custom Player LIsts, but I don't want them, I want the default ROBLOX player list with my name having an Admin badge in my game, I know this is possible due to Jailbreak has a thing for that some people have a Star next to there... | 66750 | ||||||||
1 | Script should launch just once,but it does that infinitely. why? | 146100287 | Gigaset39 | 41 | 2022-08-04 12:02:14 | <p>I got a part, that if you touch it, you get points:</p>
<pre class="brush: lua"> script.Parent.Touched:Connect(function(hit)
if hit and hit.Parent:FindFirstChild("Humanoid") then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
wait(1)
player.leaderstats.Money.Value += 10
player.leaders... | 131095 | 1 | 118419 | 2 | 124655577 | Sabailuridze | 126 | 2022-08-04 12:23:15 | <p>You can add debounce,</p>
<pre class='brush: lua'>local waittime = 2
local isTouched = false
script.Parent.Touched:Connect(function(hit)
if hit and hit.Parent:FindFirstChild("Humanoid") and not isTouched then
isTouched = true
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
wait(1)
pla... |
0 | What Variable of Tweenservice (Udim2) for Gui changes the position downwards? | 79523404 | snipperdiaper | 108 | 2020-06-30 00:14:06 | <p>I've tried a lot I just dont really undertand what combo of the four numbers brings it down</p>
<pre class='brush: lua'>WholeLabel:TweenPosition(UDim2.new(1, 0,0, 1), "Out", "Elastic", 5)
</pre>
| 107799 | 1 | 99125 | 2 | 522434929 | Qub_lex | 199 | 2020-06-30 10:35:11 | <p><a target="_blank" href="https://developer.roblox.com/en-us/api-reference/datatype/UDim2"><code>UDim2</code></a> has four values:</p>
<pre class='brush: lua'>UDim2.new(x_scale,x_offset,y_scale,y_offset)
</pre>
<p><strong>Scale</strong> is a decimal value, example: <code>0.5</code>. It "scales" the GUI down depending... |
0 | How can I check to see if the whole character's loaded? | 25516360 | Zerio920 | 285 | 2015-05-03 20:16:10 | <p>I'm using a script that makes use of BodyForce so the character can jump higher, by checking the masses of every part of the character and using the total weight of all the parts. However, sometimes the character loads too early and the script isn't able to detect every part of the character, resulting in a smaller ... | 17250 | 1 | 20640 | 2 | 3508838 | DigitalVeer | 1473 | 2015-05-04 00:04:03 | <h2>CharacterAdded</h2>
<p>You can really just use the <code>CharacterAdded</code> event to make sure that the character is fully loaded just as <em>NotsoPenguin</em> has stated in the comments:</p>
<pre class='brush: lua'>game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(s)
--do body force... |
0 | How to make an NPC go faster on low health? | 105098872 | dylancrazy88 | 20 | 2021-06-08 09:34:25 | <pre class='brush: lua'>Minor = script.Parent
Health = script.Parent
WalkSpeed = script.Parent
if Health <= 900 then
script.Parent.Minor.WalkSpeed = 39
end
</pre>
<p>i'm trying to make a script that makes it so when an NPC hits low health it goes fast
but for some reason it doesn't work when i set it to the said... | 124189 | ||||||||
5 | What is the use of a weak table and strong table? | 99696313 | saSlol2436 | 716 | 2018-06-14 22:36:27 | <h2>My Understanding</h2>
<p>I came across the words, weak tables and strong tables. I have done some research; this is what I understood from the terms:</p>
<p>Weak tables can have weak keys.
Weak tables can have weak values.
Weak tables can have weak keys and weak values.
The garbage collector can return the memory o... | 60355 | 1 | 58748 | 10 | 2155311 | EgoMoose | 802 | 2018-06-15 02:30:32 | <p>I can't say I've ever heard of strong tables before so I can't provide much insight for that. Weak tables however I understand a bit better.</p>
<p>The first thing I'll say is that weak tables have limited uses. If you find yourself trying to use them when there's a another solution you're probably just making life ... |
0 | Why are my print statements not printing? | 461604490 | 2Loos | 130 | 2020-11-21 16:44:51 | <p>So I am making a plane game. Each time the player dies, he/she is supposed to see a GUI asking them where to spawn. Here is the script. It uses <code>PlayerAdded()</code> function.</p>
<pre class='brush: lua'>local player = game.Players.LocalPlayer
local character = player.Character
game.Players.LocalPlayer.Characte... | 116105 | ||||||||
1 | Why the script can't find the humanoid??? | 1019331549 | mittomen28 | 5 | 2021-07-19 11:30:09 | <pre class='brush: lua'>local Attackanim = script.Attackanim
wait(1)
local vPlayer = game.Players.LocalPlayer
local character = vPlayer.Character
local humanoid = character.Humanoid
local AnimationTrack = humanoid:LoadAnimation(Attackanim)
local mouse = vPlayer:GetMouse()
mouse.Button1Down:Connect(function()
Animat... | 125491 | ||||||||
0 | Restricted door gone wrong? | 76326675 | nich17 | 95 | 2015-02-07 16:17:37 | <p>I am currently working on making a restricted door where when a certain person says open the door will open. i wrote some script and it hasnt worked but i dont know why can anyone help?</p>
<pre class='brush: lua'>game.Players.PlayerAdded:connect(function(player)
if player.Name == "Player" then
player.Ch... | 14792 | 1 | 17865 | 1 | 35339312 | ImageLabel | 1541 | 2015-02-07 17:04:12 | |
0 | Why does the frame not turn visible? | 37745860 | BunjiBloxxer | 51 | 2023-03-08 17:57:19 | <p>I made this LocalScript in StarterPlayerScripts that fires when a player touches 8 specific parts. It is supposed to change a Frame's visiblity property to true, but it doesn't.</p>
<pre class='brush: lua'>local showGUIEvent= game.ReplicatedStorage.ShowGUIEvent
showGUIEvent.OnClientEvent:Connect(function()
loca... | 133160 | 1 | 120243 | 0 | 139520354 | HeroFigo | 81 | 2023-03-09 20:25:44 | <p>Bruh. When a player joins the game whoever is in StarterGui gets CLONED into the Player's "PlayerGui".</p>
<pre class='brush: lua'>--This changes the GUI from the ServerStorage
local gui = game.StarterGui.NutGear
local frame = gui.YouGot
frame.Visible = true
--You want to change the players GUI
local... |
0 | anyone can help me with a respawn script for a zombie? | 1483026272 | wswswff | 39 | 2022-09-10 23:49:19 | <pre class="brush: lua">local time = script.Parent.Parent.respawn_time.Value
while true do
wait(time)
local robo=script.Parent:clone()
robo.Parent = game.Workspace
robo.HumanoidRootPart.Position = script.Parent.RoboPosition.Position
robo.Humanoid.WalkSpeed = robo.Parent.WalkSpeed.Value
r... | 131581 | 1 | 118842 | 0 | 573022162 | lamgogo | 56 | 2022-09-11 09:56:27 | <p>in line 1 use this</p>
<pre class="brush: lua">local time = script.Parent.Parent:WaitForChild("respawn_time").Value
</pre>
<p>if that still doesnt work</p>
<pre class="brush: lua">repeat wait() until script.Parent.Parent.respawn_time
local time = script.Parent.Parent.respawn_time.Value
</pre>
<p>in case both of them... |
1 | how to tween gui without finishing previous tween? | 94006350 | BulletproofVast | 385 | 2021-05-05 16:21:08 | <p>I have a gui and I want to tween it to move up and down on the screen after I press a button.</p>
<p>I did TweenService:TweenPosition and if I spam the button, it will finish current and stop working. How would I make it so if I press it again, it will go back up/down even if it didn't finish the last tween?</p>
<pr... | 123131 | 1 | 112208 | 1 | 112532095 | Vong25 | 187 | 2021-05-05 18:00:21 | <p>You have to pass the fifth <a target="_blank" href="https://developer.roblox.com/en-us/api-reference/class/GuiObject">parameter</a> to override all in-progress tweens.</p>
|
0 | Why is my color-change script not working? | 59780706 | pedrosantaana | 0 | 2014-12-23 20:22:22 | <p>Welp here it is. Please keep in mind that this is my FIRST REAL SCRIPT for a game.</p>
<p>while true do
workspace.lunarbutton.brickcolor = BrickColor.blue
workspace.lunarbutton.brickcolor = BrickColor.red</p>
<p>end</p>
| 13555 | ||||||||
0 | Player is nil and i dont know how to fix it.? | 803129850 | watarod | 0 | 2023-03-26 21:55:42 | <p>Hi, i want a GUI button to clone a gun from the server storage and parent it to the backpack of the player that clicked the button, but it doesnt work because i get an error that tells me that the player is nil (this script works completly fine in a part and a click detector)
maybe it is a dumb question but i am rea... | 133241 | ||||||||
0 | how to make a loop on true and how to make it work even if +100? | 555048241 | AshsmithTube | 15 | 2021-09-15 00:51:04 | <p>How do I make this loop so it always works so like when someone has wins = 100 and they get SMG and then they die they respawn with it again. Also how do I make it so it's not just when leaderstats = 100 wins but = 100 and +100 wins.</p>
<p>Thanks!</p>
<p>Here is the code I have: https://gyazo.com/c1ebc05cfa70e1f757... | 127449 | ||||||||
5 | How do I activate something when a person's camera is looking a certain way? | 49352468 | fireboltofdeath | 630 | 2014-05-22 14:51:40 | <p>Okay.
There is a game when you look through the door bricks appear.
I don't know how to set if the player is looking that way then it appears. All I know is to put this in a local script</p>
<pre class='brush: lua'>P = Instance.new("Part", game.Workspace.CurrentCamera)
P.CFrame = CFrame.new(xVal,zVal,yValw)
P.Size =... | 5278 | 1 | 7300 | 0 | 32315530 | IcyEvil | 260 | 2014-05-24 19:43:43 | <p>Perhaps use a Function</p>
<pre class='brush: lua'>function Camera()
Brick = game.Workspace.Part
Player = game.Workspace.findFirstChild(Humanoid)
if Player.Position == {"X","Y","Z"}
then Brick.Transparency = "0"
wait(3.0) -- Put whatever number there
end
end
Camera()
</pre>
<p>this may not work but i... |
0 | Apply localplayer clothes on a dummy? | 165331906 | IlLupoMannaro34 | 5 | 2021-02-21 15:22:54 | <p>i want to pretty much apply the local player clothes to a dummy (no hats or accessories, just clothes, so shirt and pants. I have no idea how to do that, i tried various things but they all dont seem to work.</p>
<pre class='brush: lua'>anyone can help me please?
</pre>
| 120465 | ||||||||
1 | Camera not changing CFrame? | 36818362 | chook100 | 48 | 2022-11-14 01:51:36 | <p>Trying to put the camera's position based on a part's CFrame but it is not working properly. I am not too sure why though, it does not error and it seems to me that it "worked" without actually changing anything, even though it should of. The camera does not change at all, it stays on the player.
It is a local scrip... | 132275 | ||||||||
0 | How do I make so a script only executes if a certain developer product is bought? | 1220002516 | AngryShadow345 | 0 | 2023-01-14 11:05:46 | <p>Here is the script I want to be executed:</p>
<pre class='brush: lua'>wait(1)
script.Parent.Missle.Base.Anchored = true
debounce = false
script.Parent.Button.ClickDetector.MouseClick:connect(function()
if debounce == false then
debounce = true
script.Parent.Button.Sound:Play()
local siren... | 132829 | ||||||||
1 | Is there someway to make the MouseButton1Click event fire just one time ? | 878641174 | ninjaty2003 | 8 | 2021-05-22 07:19:49 | <p>i'm making a teleport room for my roblox game, i used a MouseButton1Click event that will add the player to the table, but something went wrong, i have just clicked the Gui once but the event fire a lot of times and insert a lot of thing to the table (my roblox username), how can i fix it ?</p>
| 123672 | 1 | 112749 | 1 | 1624504218 | GameBuilderLol | 58 | 2021-05-22 07:44:49 | <p>this is what i can do, tell me if there is something wrong.</p>
|
1 | How do you make a starter/intro gui like strobe and darkness with start button and options and stuff | 15454657 | GreekGodOfMLG | 244 | 2014-03-07 03:41:06 | <p>I've always wonder how to do it and never figured it out. Can someone help?</p>
| 540 | 2 | 869 | 1 | 31265920 | Azarth | 3141 | 2014-03-07 04:41:21 | <p>This is a pretty broad question. The best I can do without actually making it for you is point you in the right direction.</p>
<p><a target="_blank" href="http://wiki.roblox.com/index.php/GUI_Guide">GUI Guide</a></p>
<p><a target="_blank" href="http://wiki.roblox.com/index.php/Beginner's_guide_to_GUI#Buttons">Button... |
1 | I NEED HELP [Solved] | 24031098 | ImmenseKassing | 120 | 2014-03-19 20:10:10 | <p>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)
for index = 1, #playerCount d... | 799 | 1 | 1236 | 4 | 4030068 | jobro13 | 980 | 2014-03-19 20:16:24 | <p>Yeah. Some general tips on this:</p>
<ul>
<li>Your approach on getting the number of players is unneeded. You can use <code>#game.Players:GetPlayers()</code> for this.</li>
<li>Your script has a logic bug.</li>
</ul>
<p>In the case that there are not two players - a non-waited while loop runs. This should crash your... |
0 | When I unequiped my tool the click multiplies, how do i fix it?(Fixed thx people) | 1341279288 | adcd433 | 5 | 2020-08-01 19:09:55 | <p>This is in local Script</p>
<p>local Tool = script.Parent</p>
<p>local UserInputService = game:GetService("UserInputService")</p>
<p>Tool.Equipped:Connect(function()</p>
<pre class="brush: lua">UserInputService.InputBegan:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 then
... | 110491 | ||||||||
0 | how i make a part clone with his childs? | 316673208 | ImDragron | 7 | 2023-03-08 01:47:39 | <p>im making a skins system and when i put all the effects of a skin in the folder with the base part when i clone the base part it doesnt clone with his childs(the effects of the skin)</p>
<p>Global script</p>
<pre class='brush: lua'>local Pos = game.ReplicatedStorage.LaunchTruss --/-RemoteEvent
Pos.OnServerEvent:Conn... | 133157 | ||||||||
0 | Why doesn't roblox animations load? (Fixed Myself no need to answer) | 551769533 | CodedStars | 69 | 2021-02-23 17:19:45 | <p>I've been working on a tool which when you click, it plays an animation.</p>
<p>ServerScript:</p>
<pre class='brush: lua'>script.Parent.Activated:Connect(function()
local User = script.Parent.Parent.Name
wait(0.5)
print('testing 1-2-3')
local animation = game.Workspace:FindFirstChild(User).Humanoid:LoadAnimation(scr... | 120572 | ||||||||
3 | Evaluate if a number is considered a happy number in the least amount of characters? | 44083134 | Fifkee | 2017 | 2020-04-18 15:23:56 | <p>For more clarification, a number is happy when the sum of the square of all numbers within a given number is equal to 1. If you enter a loop when calculating the happy number, that means the number is unhappy. :(</p>
<p>Print statements are not part of your character count. Your code should explicitly state if the n... | 99762 | ||||||||
1 | [REPOST] Disable I and O keys? | 124636677 | Inventfvl | 21 | 2017-06-19 19:55:09 | <p>Hi there, is there a way to disable I and O keys? I mean like the I and O keys for the camera.</p>
| 44201 | 1 | 45360 | 1 | 51714312 | Rawblocky | 217 | 2017-06-19 21:29:05 | <p>There isn't a way, but to make it so you can't zoom in and out, select "StarterPlayer". Then, change "CameraMaxZoomDistance" & "CameraMinZoomDistance" to 10. It will make it so you can't zoom in or out.</p>
|
0 | Why doesn't an ImageLabel render an image? | 109513948 | SpectacularPavlos | 0 | 2021-05-04 20:33:19 | <p>So basically I'm trying to use one of Nasa's APIs to create a roblox game. The API obviously returns JSON and images get returned as URLs.</p>
<p>Here's my code, to test the API (Not the final code)</p>
<pre class='brush: lua'>local HttpService = game:GetService("HttpService")
local URL = "https://api.nasa.gov/plane... | 123094 | ||||||||
0 | How do I access the player through the character? | 429721857 | iCoconutt | 46 | 2019-09-24 20:24:33 | <pre class='brush: lua'>local player = hit.Parent:GetPlayerFromCharacter()
</pre>
<p>I've made a teleport script that teleports players into the <em>fighting arena</em> for my game. Just recently I decided to look back into the script to add in the "inCombat" mode once they've used the teleporter, but in order to turn ... | 87895 | 2 | 81477 | 0 | 15438711 | cloud9josh | 1109 | 2019-09-24 20:36:43 | <p>You are close.</p>
<p>You would use the Player service like you are using, but you put the Character in the parameter.</p>
<pre class='brush: lua'>local Players = game:GetService('Players')
local Part = workspace.Part
Part.Touched:Connect(function(otherPart)
local Player = Players:GetPlayerFromCharacter(otherPar... |
0 | Problem with a part not turning off cancollide with a localscript? | 642967600 | tonomeow | 5 | 2022-11-20 23:29:16 | <p>So i have this script but its server side, the script makes it so when you touch the part with the script in it the other part named wall getts its cancollide turned off. But i need it to work client side. So I put it in a local script but it does not work. Can someone help me?</p>
<p>Heres the script:</p>
<pre clas... | 132326 | 1 | 119518 | 0 | 148527490 | manith513 | 61 | 2022-11-21 03:52:03 | <p>Use a remote event that fires to the client you want cancollide turned off for. In a local script, set it where when the remote event is fired, it does whatever you want. (In this case setting the cancollide of a part to true or false.)</p>
|
0 | How do you put a number value in a wait()? | 1483026272 | wswswff | 39 | 2022-09-09 23:31:47 | <p>I would like this so I could change the time that it takes for a zombie to respawn. the code:</p>
<p>local 2 = script.Parent.respawn_time -- respawn_time is the number value
robo=script.Parent:clone()</p>
| 131564 | ||||||||
0 | How do i kick all players in the server? | 694822730 | IEntity_303I | 2 | 2020-07-31 21:18:40 | <p>i've tried this but it didnt work code:</p>
<pre class='brush: lua'>local players = game.Players:GetPlayers()
players:Kick("Shutdown")
</pre>
| 110410 | 1 | 101432 | 0 | 359021642 | Sinful_Mage | 159 | 2020-07-31 21:29:50 | <p>You need to loop through all the players in a for loop</p>
<pre class='brush: lua'>local Players = game:GetService("Players") ---- game.Players
for _,Player in pairs (Players:GetPlayers()) do --- looping through all the players
Player:Kick("Shutdown") --- kicking them one by one in a for loop
end
</pre>
|
0 | How do i change the position of a textbutton in a scrolling gui? | 145701075 | preston1196 | 22 | 2020-04-18 05:20:31 | <p>My problem currently is that my text buttons are not going into a list format they just stay in the same position.</p>
<p>Code: label.Position = UDim2.new(0.027, 0, i * template.Size.Y.Scale, 0) --This is the part that needs to be fixed.</p>
| 99720 | 1 | 92104 | 0 | 108684178 | Valtonian | 43 | 2020-04-18 05:56:25 | <p>I think the issue may be that template.Size.Y.Scale is not even an actual property. Unless you predefined it, that would be the issue. What I would do is:</p>
<pre class='brush: lua'>label.Position = UDim2.new(0.027, 0, 0.024 * (i-1), 0)
</pre>
<p>Basically, this adds .027 to the index of a table minus 1, which basi... |
1 | How to trigger a ScreenGui with this Script? | 144804234 | Chris75764 | 49 | 2018-04-19 20:45:40 | <p>Basically, im doing a Sonic Forces in roblox, and i have been programming the double boost, it getting triggered when a part is touched, And it stops after another part is touched, however, it also haves to trigger a GUI that tells you to click it, Increasing your double boost walkspeed by +10 (Regularly its 50, if ... | 57089 | 1 | 55797 | 0 | 451528150 | 522049 | 152 | 2018-04-19 22:21:12 | <pre class='brush: lua'>local partclicked = 0
script.Parent.Touched:connect(function(part)
if partclicked == 0 then
partclicked = 1
--A animation should play here, dont worry, ill make it.
if not part.Parent then return end
local humanoid = part.Parent:FindFirstChild("Humanoid")
local player = game.... |
1 | Is there a way to use SavePlaceAsync() that doesn't return errors? | 148020737 | Oxygen4Lyfe | 408 | 2018-08-17 00:10:51 | <p>I want to save the place when the remote event is called. Currently I get the error HTTP 403 (HTTP/1.1 403 Forbidden) [Yes I am testing in-game not in studio] [Yes 'Allow this place to be copied as a template using the Create Place API in your game.' and 'Allow this place to be updated using the Save Place API in yo... | 65647 | ||||||||
0 | How can I make a Script that shows how many people are standing on a brick? | 18316213 | PancakeAttacks | 0 | 2014-04-16 00:37:42 | <p><em>Like a gui from Murder Mystery on the map voting.</em></p>
| 1978 | ||||||||
0 | Works in Studio but not in client! What have I done wrong? [UNSOLVED] | 3200702 | Michael007800 | 144 | 2014-04-30 21:56:21 | <p>When I test out my game in Studio, it seems to work fine but then I play the game on the client via the website, the GUI's don't seem to change when I click on them. And yes, they are text Buttons and nothing else.</p>
<pre class='brush: lua'>local Button = script.Parent
Frame = script.Parent.window2
hide = script.P... | 4013 | ||||||||
0 | How to disable and enable back a script? | 146100287 | Gigaset39 | 111 | 2022-08-11 14:52:16 | <p>Hi i created a part that when u click it disable a script that contains the ”MainScript”,
and it works, but.. it just that when i enable the script, the script woldnt work, do u guys know why? :D i use this script to”close it”:</p>
<pre class="brush: lua"> MainGame = game.ServerScriptService.MainGame
function ... | 131194 | 1 | 118505 | 1 | 433962773 | theking66hayday | 841 | 2022-08-11 18:55:38 | <p>Try disabling the script, then in your script enable it when it is clicked that should work I think.</p>
|
0 | Can you make me a script to pickup apples into a screen gui? | 297733773 | meecos | 0 | 2021-05-03 15:32:30 | <p>Hi, i would like a script for my game... I want to pickup apples and put them in an not existing backpack ( a screen gui that says for an expample: 1/20 ), i would like that number to change whenever i click on an apple (add 1). Is that possible? Thanks if you can :D
(btw the apples are called click)</p>
| 123057 | ||||||||
0 | How to make a song play using a button? | 328413134 | LiLFriks | 39 | 2020-07-19 21:50:10 | <p>Hi! I'm just learning how to script, and I'd like some guidance. So I have a click detector and a script in a part named "button" in workspace. The script makes music play that you can hear in-game. I'm trying to script it so that when the button is pressed, the next song starts playing, and no matter how many times... | 109485 | 4 | 100571 | 0 | 357035682 | mikey2019d | 43 | 2020-07-19 22:31:56 | <pre class='brush: lua'>local songs = {
"http://www.roblox.com/asset/?id=2538961789",
"http://www.roblox.com/asset/?id=4867633321",
"http://www.roblox.com/asset/?id=2231782710",
"http://www.roblox.com/asset/?id=2206587324"
}
local songLength = #songs
local Sound = script.Parent.Parent.Sound
local CD = s... |
0 | How would I parse HTML data from a website? | 193019473 | cruizer_snowman | 117 | 2020-03-15 22:29:53 | <p>Hey everyone,
I recently started to learn about https and how to use it with Roblox lua. Although still pretty confused, I think I understand the basics. Looking at it in the Roblox Dev Hub, it gives an example suggesting that the website returns JSON data. Now most websites I have encountered don't do this, and ins... | 96158 | ||||||||
0 | how do I make it detect if someone joins the game? | 1742076622 | Greninja90290 | 4 | 2021-02-22 11:39:03 | <p>I want to make it so if someone joins the game it will detect that they joined the game and then it will make a new variable in a table? and when someone leaves the game their variable gets deleted?</p>
| 120509 | 1 | 109880 | 1 | 528894344 | The_Saver31 | 32 | 2021-02-22 11:42:48 | <p>You can use <em>Players.PlayersAdded</em> and <em>Players.PlayerRemoving</em></p>
<p>Example:</p>
<pre class='brush: lua'>local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
print(player.Name .. " joined the game!")
end)
Players.PlayerRemoving:Connect(function(player)
prin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.