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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | Attempt to index nil with 'CFrame'? | 538824226 | Brioche_Noodle | 45 | 2023-02-16 10:01:30 | <p>** EDIT: I realized that I typed something wrong.
**</p>
<p>I have this error on my Local Script ( Camera Script ) and it says attempt to index nil with 'CFrame'.
Now the weird problem with this script is that I have the same function which does the same thing and there aren't any errors on that function.</p>
<pre c... | 133077 | ||||||||
0 | How can I compare to Color3 values? | 62061300 | AstrealDev | 723 | 2017-04-03 20:25:22 | <p>Example:</p>
<pre class='brush: lua'>if Color3.new(255/255,255/255,255/255) >= Color3.new(255/244,255/244,255/244) then
print("Woah!")
end
</pre>
<p>I get an error saying:</p>
<p><strong><em>attempt to compare two userdata values</em></strong></p>
| 41629 | 1 | 43444 | 0 | 87138498 | cabbler | 1942 | 2017-04-04 04:18:18 | <p>Convert them to vectors then compare their magnitude.</p>
<pre class='brush: lua'>local c1, c2 = Color3.new(1,1,1), Color3.fromRGB(244,244,244)
if Vector3.new(c1.r,c1.g,c1.b).magnitude >= Vector3.new(c2.r,c2.g,c2.b).magnitude then
print("Woah!")
end
</pre>
|
0 | How do I fix the player not morphing? | 446008543 | Meeptey2 | 51 | 2022-06-18 20:23:29 | <p>I'm trying to make a system where you spawn as a rat in a game I'm making, but the system isn't working despite me having looked up multiple tutorials on the subject. So how do I fix this?
Here is the code in "PlayerHandler":</p>
<pre class='brush: lua'>local ss = game:GetService("ServerStorage")
local bs = game:Get... | 130394 | ||||||||
0 | Jump Height and Gravity | 29806839 | ConnorVIII | 448 | 2014-03-12 19:48:21 | <p>I am not asking anyone to scirpt for me, I just want to know if there is a way to make someone's jump go higher, or less gravity ingame via a shop. Do you have to add your own script to the character or change the existing one?</p>
| 649 | 1 | 1038 | 13 | 19566737 | Unclear | 1776 | 2014-03-12 20:19:53 | <p>[ I'm on mobile, so sorry for any errors I have ]</p>
<p>You can just use a BodyForce object to help you counter the force of gravity.</p>
<p>BodyForce applies a constant force on an object. You probably don't know what force is, so I'll explain the basics.</p>
<p>Force is the acceleration multiplied by the mass of ... |
0 | Player is a 'Nil Value' in a LocalScript ? | 20471378 | LordTechet | 53 | 2018-04-19 16:18:05 | <p>So I'm trying to make a player TP onto a part once clicked on it, but I get this message:</p>
<p><strong>19:14:06.480 - Workspace.Plate.Script:17: attempt to index upvalue 'Player' (a nil value)</strong></p>
<p>I've already searched for help from here and other places, but they don't fix the issue I have, the script... | 57083 | ||||||||
2 | [Solved]: What are Magnitude's and Unit's? | 1354321048 | Hi_People1133 | 168 | 2022-06-24 04:21:35 | <h2><strong>Hello My dear scripting fellows,</strong></h2>
<p>Today I tried to learn RayCasting but what I don't understand is that when I Cast a Ray with its two Parameters(Origin Position, RayDirection), the Ray doesn't reach far enough when clicked because I use <code>LocalPlayer:GetMouse().Hit.Position</code>. The ... | 130493 | 1 | 117837 | 2 | 57053468 | aviel101 | 120 | 2022-06-24 20:10:32 | <p><strong>Magnitudes</strong></p>
<p>(pos1 - pos2).Magnitude will give you the distance between the two positions in studs</p>
<p>generally Magnitude will give you the length of the vector, so doing pos1.Magnitude will give you the length of the vector that starts from (0, 0, 0) and ends at (pos1.X, pos1.Y, pos1.Z)</p... |
1 | Question about variables being defined in events and used in different scopes? | 212599689 | asmetics | 26 | 2023-01-22 23:04:56 | <p>Okay so Let's say I had code like this:</p>
<pre class='brush: lua'>game.Workspace.ChildAdded:Connect(function(added)
-- some code
end)
added.Transparency = 1* -- if I tried to run this it would say (unknown global "added") or something
</pre>
<p>I'm not asking about that code in specific I'm more of asking if I... | 132916 | 1 | 120047 | 2 | 39250676 | ScriptGuider | 5640 | 2023-01-23 02:57:48 | <h2>Solution <strong>(don't do this)</strong></h2>
<p>If you want to access the parameter values of callback functions outside of the callback function (which is what you're doing in your example code), you can simply declare a local variable outside of the callback and assign it to whatever the function argument is wi... |
1 | Click TextButton to get kicked from the server script doesn't work, can anyone help? | 32975136 | YoureTotallyScrewed | 9 | 2020-11-23 16:49:44 | <p>Hello! I'm experimenting with scripting so I'm fairly new, and I wanted to create a button that can kick you from the server.</p>
<pre class='brush: lua'>FateButton = workspace.killroom.KBcontrolpanel.KILLBUTTON
function death(gb,msg)
FateButton.Part.SurfaceGui.TextLabel.Text = (gb)
print(msg)
return
end... | 116211 | 2 | 106640 | 1 | 103833540 | deeskaalstickman649 | 388 | 2020-11-23 17:27:13 | <p>Line 8 <code>local plr = game.Players:FindFirstChild()</code> uses the built-in function <code>:FindFirstChild</code>, which requires the first parameter as the child to look for. You can't find a child if you provide no child name.</p>
|
0 | HopperBin doesn't get removed in player's inventory? | 2064359146 | GamerLighting23233 | 63 | 2022-04-15 12:28:46 | <p>I was trying to remove the HopperBin in user's inventory using the following script:</p>
<pre class="brush: lua">game.Players.PlayerAdded:Connect(function(player)
for i,v in pairs(player.Backpack:GetChildren())
if v:IsA("HopperBin") then
v:Destroy()
end
end
end)
</pre>
<p>Instead ... | 129668 | 1 | 117220 | 1 | 94362681 | collin1212121 | 146 | 2022-04-15 20:39:17 | <p>1st of all, you should try it when the <strong>Character</strong> is added. Tools and such do not go straight to the backpack, it <strong>waits until the character is added and then adds tools to the backpack</strong>.</p>
<p>2nd of all, I wouldn't use HopperBins to begin with, as they're <strong>deprecated</strong>... |
0 | Is there a way in Roblox Studio to assign something a random number? | 207152335 | GottaHaveAFunTime | 218 | 2018-04-20 00:20:45 | <p>So like I am trying to assign a folder a number value along with a model. What I mean by that is -</p>
<p>Say there is 1 small shack in a folder then it would be named small shack1 and inside replicated storage inside a folder there would be a folder named small shack1, how would I make them count up.</p>
<p>So smal... | 57109 | 2 | 55807 | 1 | 97994113 | TdaGreat04 | 76 | 2018-04-20 00:35:25 | <p>This is the best I can do with the little information you game me.
For it to work the object must be named "small shack" and be parented to the folder containing the models.</p>
<pre class='brush: lua'>local c1 = 1 -- Folder Count
local c2 = 1 -- Replicated Storage Count
local folder1= script.Parent -- The Folder co... |
0 | How can i detect if someone has the tool equiped? | 238214569 | Locpsoyyo | 2 | 2021-02-22 22:20:17 | <p>suelo.TouchEnded:Connect(function(regue)
if game.Players.LocalPlayer.Backpack.chivo.Equipped then
if suelo.BrickColor == BrickColor.new("Cocoa") then
semilla.Transparency = 0
end
end
end)</p>
<p>i´ve been using this but it doesn´t work with the replicated storage</p>
| 120533 | 1 | 109907 | 1 | 590773745 | aurich98 | 86 | 2021-02-22 22:22:07 | <p>Check for the tool in their character; when a tool is equipped, it is moved to their character.
You can use <code>FindFirstChildWhichIsA</code></p>
|
0 | How do I stop my pathfinding NPC from freezing? | 144335477 | RainDroutz | 13 | 2022-08-03 09:44:55 | <p>I have a pathfinding NPC which obviously intends to go from one location to another, however I encounter this problem where I found that if I am not anywhere near the NPC, it just stops moving. I understand that this might be a NetworkOwnership type of issue thing but I have already set the ownership to the server. ... | 131078 | ||||||||
0 | Is It possible to :destroy() all of your tools in the starter pack with code? | 1609610586 | Iownrobloxp | 44 | 2021-09-19 18:11:17 | <p>I am working on a game and the button that I have uses this code To remove a single tool</p>
<pre class='brush: lua'>local plr = game:GetService('Players').LocalPlayer
plr.Backpack:FindFirstChildWhichIsA('Tool'):Destroy()
</pre>
<p>I was wondering if I could expand on this and make it to were it would delete ALL too... | 127556 | 2 | 115695 | 0 | 303357794 | ColdFoxy07 | 61 | 2021-09-19 18:14:11 | <p>This is probably what you are searching for:</p>
<pre class='brush: lua'>local plr = game:GetService('Players').LocalPlayer
local backpack = plr:WaitForChild("Backpack")
for i, v in pairs(backpack:GetChildren()) do
if v:IsA("Tool") then
v:Destroy()
end
end
</pre>
<p>Hope this helped!</p>
|
1 | [UNSOLVED] Why Does My DataStore Not Work With My Global LeaderBoard? | 107699267 | Puffyjasonrocks84 | 39 | 2022-06-18 21:27:25 | <p>I Have A Global Leaderboard And Leaderstats They Work Just Fine But When I Added A DataStore To Save The Data It Shows The Leaderstat as 0 And Doesn't Show Anything Here Are My Scripts:</p>
<p>This Is The Leaderstats And DataStore Script</p>
<pre class="brush: lua">local dataStoreService = game:GetService('DataStore... | 130395 | ||||||||
1 | Why is my number script not working properly? | 314237552 | edwin_thirdy | 7 | 2022-08-02 07:35:31 | <p>Whenever I playtest the game with 2 players, only their number gets shown, but not anyone else's.</p>
<p>For example: 2 players are in the game, they both have BillboardGuis on top of them. Both of those <strong>players can see "Your number is: THIS NUMBER" on their character</strong>, but when they <strong>look at ... | 131056 | 1 | 118396 | 0 | 124655577 | Sabailuridze | 111 | 2022-08-02 09:47:56 | <p>I think issue is that second script is in localscript so it will only show to player, what you should do is you can make remote event and fire it, then put script in serverscriptstorage and onserverevent change text, like this.</p>
<p>LocalScript</p>
<pre class='brush: lua'>local billboardamount = game.Players.Local... |
0 | Why do I get the "HeadScale is not a valid member of Model 'Workspace.(PlayerName)'" error? | 1930209503 | Isocyanic | 2 | 2020-10-18 07:24:08 | <p>I'm trying to make a player shrink, speed up, and become invisible when they touch a certain part, using a client-to-server remote event.</p>
<p>Here's the local script:</p>
<pre class='brush: lua'>local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local hum = char:... | 114509 | 1 | 105187 | 0 | 1169989018 | LinavolicaDev | 540 | 2020-10-18 07:36:01 | <p>One thing, the <code>scales</code> are based on <code>RBXVALUEOBJECTS</code>, so.</p>
<pre class='brush: lua'>local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEvent = ReplicatedStorage:WaitForChild("RemoteEventTest")
local function inkTouched(player, char, hum)
hum.HeadScale.Value = 0.0... |
0 | Team Remover [Isn't working?] | 5474129 | anthonypjo | 5 | 2015-03-22 20:23:19 | <p>Hey, I have worked on a Team remover script. Basically, it remove the teams if there is no one on it.
It only clear the nobodyt table, but nothing else happen.
Anyone have a solution?</p>
<pre class='brush: lua'>local Time = 25
local nobodyt = {}
local savelist = {}
while true do
wait(Time)
for i,v in ipairs(game.Pl... | 15992 | 1 | 19181 | 1 | 386992 | BlueTaslem | 17977 | 2015-03-23 00:30:08 | <p>First, <strong>Tab your code correctly</strong>.</p>
<p>Next, <strong>use meaningful variable names</strong>. Why say <code>v</code> when you mean <code>player</code>? Also, use <code>_</code> for a variable you don't use (like the first <code>i</code>).</p>
<p>I have a number of concerns with this script as it is w... |
0 | How to make the camera follow the player using scriptable camera type? | 660109478 | Cikeruw | 14 | 2023-03-17 21:21:04 | <p>How would i make the camera follow player you using scriptable camera type?</p>
| 133206 | ||||||||
0 | When a tool touches a part, it teliports player? | 1335105325 | SUPERKID8713 | 14 | 2022-05-12 01:30:06 | <p>This script I made is that when this tool touches a part, it teleports the player to another map, but when the tool does touch the part, nothing happens. I think the script needs to be inside the tool, but the problem is that I do not know how to define it, Here is the script that I have so far that is inside the to... | 129973 | ||||||||
0 | How to disable Tool Collisions? | 1055176629 | xxIamInevitable | 2 | 2020-09-14 07:46:56 | <p>How would I disable tool collisions without making it fall into the void? I want it so that parts of the tool don't collide or get stuck with anything. Because if you could see <a target="_blank" href="https://www.roblox.com/games/refer?SortName=MyRecent&PlaceId=5661803460&Position=3&PageType=Home&Lo... | 113153 | 2 | 103883 | 1 | 118343046 | Elyzzia | 1289 | 2020-09-14 15:34:27 | <p>rather than trying to make the tools completely uncollidable, you could try making them uncollidable when a player is holding them, but collidable otherwise</p>
<pre class='brush: lua'>local tool = script.Parent
local Players = game:GetService("Players")
-- scripts don't run when they're in the player's backpack so ... |
2 | Rotating along a single axis to point at another position? | 343558 | Sublimus | 992 | 2015-07-28 20:54:01 | <p>How would I do this, or at least where should I start? I'm trying to rotate the players arms to follow a point only along one axis.</p>
| 20556 | 1 | 24206 | 0 | 386992 | BlueTaslem | 18062 | 2015-07-29 02:37:45 | <p>First, solving a simpler question:</p>
<p>You have a <code>brick</code> that you want to point at a point <code>target</code>, but only turn around the (world's) Y axis -- the part will stay level, parallel to the ground, but face towards the target laterally.</p>
<p>I'm going to restrict us from using <code>CFrame.... |
4 | Why won't this script for my GUI not work? | 12132870 | Prioxis | 673 | 2014-05-31 23:05:34 | <p>So i'm making a console script that when I type <strong>Console_GivePoints_1500</strong> it gives me 1500 points</p>
<pre class='brush: lua'>function Click()
if script.Parent.Parent.TextBox.Text == "Console_GivePoints_1500"
then
script.Parent.Parent.Parent.Parent.Parent.leaderstats.Money.Value = script.Paren... | 5940 | 1 | 7890 | 4 | 29251132 | HexC3D | 830 | 2014-05-31 23:09:27 | <pre class='brush: lua'>local zombie = game.Lighting.Zombie
function Click()
if script.Parent.Parent.TextBox.Text == "Console_GivePoints_1500"
then
script.Parent.Parent.Parent.Parent.Parent.leaderstats.Money.Value = script.Parent.Parent.Parent.Parent.Parent.leaderstats.Money.Value + 1500
elseif script.Parent.Pa... |
1 | string substitution returning unwanted value? | 110029109 | loowa_yawn | 383 | 2023-02-24 23:20:45 | <p>i am working on command formatting right now, and for my code i have implemented this solution:</p>
<pre class='brush: lua'>-- context
local Message = ".lock true"
local SL_SETTINGS = {CommandPrefix = "."}
-- actual script
local splitMessage = Message:split(" ")
local command = splitMessage[1]
local no_prefix = stri... | 133114 | 1 | 120204 | 2 | 245864252 | xInfinityBear | 1777 | 2023-02-25 00:58:11 | <p><code>.</code> is a <a target="_blank" href="https://create.roblox.com/docs/reference/engine/libraries/string#Character%20Classes:~:text=Character%20Classes"><strong>string pattern</strong></a> that represents <strong><em>any</em></strong> character; therefore, it is replacing all the characters in the string.</p>
<... |
0 | im so confused on this? ive been doing it for an hour and a half and it wont work | 518263070 | hudstir | 0 | 2022-10-04 00:46:19 | <p>local replicated = game:GetService("ReplicatedStorage")
local kickplayer = replicated:WaitForChild("KickPlayer")
local player = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
local objective1 = game.StarterGui.ScreenGui.Frame.Objective1
local objective2 = game.StarterGui.ScreenGui.Frame.Objective2
local... | 131795 | ||||||||
0 | Humanoid:AddAccessory() does not work? | 92320296 | TornadoCookie | 20 | 2021-04-06 13:40:23 | <p>I am making a hat dispenser, when inputted an id, the dispenser will equip the hat to the character of the player. I am using a serverside script and a RemoteFunction to gain access to InsertService from the client. Everything works fine, there are no errors, but when it gets to Humanoid:AddAccessory(), it doesn't e... | 122070 | ||||||||
0 | Help with a material-based bullet hole system with ACS 1.7? | 956689308 | Cryptographz | 0 | 2020-08-01 02:00:52 | <p>Hello, I am currently working on a custom version of ACS 1.7 and I wish to make a material-based bullethole system, I already have the basics of it so, when you shoot, it creates a bullethole on whatever part the bullet hit. Now, what I need is for it to be material-based, so basically, different bulletholes dependi... | 110434 | ||||||||
0 | Having problem with humanoid name display distance can anyone help? | 113876711 | Sammyboy2129 | 0 | 2017-04-13 10:53:40 | <p>When in game you cannot see each others name and i copyed everything in game onto another game (except test service, network client (Team Create), and terrain) and usernames could then be seen so i ran a two player test server on the first game and found in the humanoid it said NameDisplayDistance 0 but i have no id... | 41941 | ||||||||
0 | Any way to unlock RobloxLocked objects? | 285085346 | TigerManGamingYT | 2 | 2019-04-25 23:55:58 | <p>I would like to be able to destroy the RobloxGui in CoreGui for anybody who is caught exploiting in my game, but it's RobloxLocked.. Is there anyway to disable that?</p>
| 79484 | ||||||||
0 | The current identity (2) cannot set a Player's name (lacking permission 4)? | 319867467 | XxxTheBrighterxxX | 0 | 2021-02-09 15:47:45 | <p>Hi everyone! Its my first time making a game and i got this error. i dont know whats wrong. please help me!</p>
<p>The script is here:</p>
<pre class="brush: lua">local function equipPet(player,pet)
local character = player.Character
if pet ~= nil and character ~= nil then
if character:FindFirstChild... | 119866 | ||||||||
0 | Draggable GUI's bottom bit not going along with title bar? | 119827832 | Edentrix | 2 | 2019-06-30 19:54:06 | <p>Hello, i'm making a draggable GUI with a title bar but here's the problem, when i drag the title bar, i want the other window to move along with it, is there any solution?</p>
<p>I'm still a bit new to posting.</p>
| 82711 | 1 | 76897 | 0 | 121332062 | AlertShamrock | 37 | 2019-06-30 20:40:02 | <p>I think you should read
https://devforum.roblox.com/t/simple-module-for-creating-draggable-gui-elements/230678
It about Draggable GUI (Game User Interface)</p>
|
0 | How to make a round script? | 45343856 | stanford7787 | 0 | 2014-04-17 00:54:09 | <p>I was wondering how to make a round script that NEVER Ends, so The game can continue.</p>
| 2327 | 2 | 3187 | 3 | 543545 | AgentFirefox | 30 | 2014-04-17 01:15:54 | <p>There are a few ways to do this.
The first method is using a while loop.</p>
<pre class='brush: lua'>while true do
PlayRound()
end
</pre>
<p>This will constantly execute any code in the PlayRound function (which will need to be defined above the while loop), and for your case, the code to play your game in round... |
0 | How do I go about making a Get money on kill for my Zombie NPC? | 153830228 | KCbiulder | 0 | 2020-07-30 17:38:54 | <p>I have tried every youtube tutorial out there even after making some scripts myself, and I cannot figure out a way to make get cash on kill script for my zombie NPC's. So I am here to see if I can get some pointers in the correct direction so I can get the rest of my game underway.</p>
| 110318 | ||||||||
0 | How to check if string is an integer? | 221721070 | NorteX_tv | 101 | 2018-12-16 20:24:07 | <p>I have a TextBox and I need to check if the player has input integer (no letters or special symbols)
Something like:
<code>if (string.isInteger) == true/false</code></p>
| 72425 | ||||||||
0 | How to not infinitely spawn cars at button click? | 1752724383 | Xyternal | 192 | 2021-05-16 16:35:30 | <p>So this question links to my first one. I sort of figured out how to add a new model on button touch, but now, whenever I touch the block, the car keeps on being cloned, and crashes the game. Can you please help???</p>
<pre class='brush: lua'>local car = game.Workspace.car
function clone()
local yes = car:Clone(... | 123495 | 3 | 112575 | 0 | 307321409 | TheBigBro122 | 427 | 2021-05-16 16:50:48 | <p>a simple debounce should do the trick!</p>
<pre class='brush: lua'>local car = game.Workspace.car
local debounce = false
function clone()
if not debounce then
debounce = true
local yes = car:Clone()
yes.Parent = game.Workspace
yes.Position = Vector3.new(300.905, 6.5, -275.073)
... |
0 | Click Button Doesn't Work ;( (it says that there is no error)? | 946498536 | Not_Paulo | 4 | 2020-09-21 12:04:18 | <pre class='brush: lua'>variable = game.StarterGui.ScreenGui.Numbers.TextLabel.hi
game.StarterGui.ScreenGui.Frame.TextButton.MouseButton1Down:Connect(function()
variable.Value = variable.Value + 1
game.StarterGui.ScreenGui.Numbers.TextLabel.Text = "Clicks:"..variable.Value
end)
</pre>
<p>I was confused when i w... | 113445 | 1 | 104127 | 0 | 631603904 | BestCreativeBoy | 1355 | 2020-09-21 12:25:07 | <p>First thing, don't ever use 'game.StarterGui' or anything as its content gets copied to the separate folder, which is located in the Player, called 'PlayerGui'.</p>
<p>Second, you haven't used a 'local' while creating the variable.</p>
<p>Also, it should be a LocalScript.</p>
<p>Here, I am assuming that your content... |
0 | [SOLVED]Can you resize textbuttons? | 6030494 | Exsius | 162 | 2014-02-27 03:20:56 | <p>I have tried making a GUI myself but the Gui textbutton doesn't resize with my img gui when i resize the Roblox client window!</p>
<p>Thanks,</p>
<p>Exsius,</p>
| 326 | 1 | 595 | 0 | 31265920 | Azarth | 3141 | 2014-02-27 03:29:24 | <p>Use scale to allow dynamic change between screen sizes - will stay the same size for different screen sizes.
TextButton.Size = UDim2.new(.01,0,.01,0)</p>
<p>Use Offset for scaling via pixels - won't stay the same for different screen sizes.
TextButton.Size = UDim2.new(0,100,0,100)</p>
<p>http://wiki.roblox.com/index... |
0 | how can i make player transform to block or chair or table....? | 883884971 | akramelbasiony1 | 0 | 2022-06-20 11:16:59 | <p>im do a game like hide and sick and i cant script player transform to any thing like chair or table how can i script it?</p>
<p>soory for my english. :-(</p>
| 130417 | ||||||||
0 | "rbxassetid//".. player isnt working? | 88576811 | FrezeTagger | 75 | 2018-04-15 15:03:19 | <p>Hello i am making admin commands, i want to make sound script but it isnt working can i get an help please? Thanks!</p>
<pre class='brush: lua'>function commandTable.sound(message, player)
local sarki = Instance.new("Sound")
sarki.Parent = game.Workspace
wait(0.1)
sarki.SoundId = "rbxassetid://" ..pl... | 56879 | ||||||||
0 | The developer Console says "index nil" for my script. How do I fix this? | 503715506 | snowpototoy | 37 | 2022-05-02 05:55:38 | <p>Script:</p>
<pre class='brush: lua'><br />function make(pos)
local g = Instance.new("Part")
g.Parent = workspace
g.BrickColor = BrickColor.new("Cork")
g.Size = Vector3.new(4,4,4)
g.CFrame = pos
end
script.Parent.Parent.Activated:Connect(function()
local mouse = game.Players:GetPlayerFromChara... | 129888 | ||||||||
1 | Humanoid Description Bug Killing Player? | 151702995 | RealTinCan | 217 | 2020-11-10 03:34:28 | <p>So basically when a player joins my game I am trying to default them to normal body parts. "The normal cubical ones". To do this I am cloning their current <strong>HumanoidDescription</strong> and then changing all the bodyType values to <strong>0</strong>. But I came to a problem for certain people with "special" b... | 115576 | ||||||||
0 | How to make the player constantly face a part? | 368080440 | VAnkata20 | 49 | 2022-06-17 18:43:32 | <p>I am trying to make a focus system. The thing I am trying to do is when shift is pressed the Local Player constantly faces an NPC (Enemy) Head while making the camera also to look at the Enemy.</p>
<pre class='brush: lua'>Events.LockToEnemy.OnServerInvoke = function(player , pressed)
print(chainedEnemyGlobal... | 130381 | ||||||||
0 | Instance.new not creating parts? | 16826035 | YellowoTide | 1989 | 2014-05-11 22:21:01 | <pre class='brush: lua'>script.Parent.Touched:connect(function(hit)
if hit.Planks and hit.Name == "Log" then
planks = hit.Planks.Value
for i = 1, tonumber(planks) do
part = Instance.new("Part")
part.Position = Vector3.new(hit.Position)
part.Size = Vector3.... | 4732 | 1 | 6367 | 3 | 20901244 | Aethex | 255 | 2014-05-11 22:36:28 | <p>The problem you are having is that you are not assigning the part's parent. Do you want it in the Workspace, Lighting, etc? There are two ways to assign the parent of it,</p>
<p>One: <code>part = Instance.new("Part", Workspace)</code>,</p>
<p>Two: <code>part = Instance.new("Part") part.Parent = Workspace</code></p>
|
1 | Camera Manipulation | 28135222 | FearMeIAmLag | 1161 | 2014-02-17 17:13:33 | <p>I want to manipulate a camera to be a "death cam", so that it watches the killer after a player dies. To be more descriptive, when the localplayer dies, the camera would zoom in on the player that killed them and then return to looking at the localplayer when they respawned. An example of this can be found in Litozi... | 37 | 2 | 72 | 3 | 947798 | MrNicNac | 855 | 2014-02-17 17:22:30 | <p>It's typical for a dying Humanoid to have one, or multiple, ObjectValues called 'creator' in them when they die. This is the standard for deaths/kills in ROBLOX (handling them, at least). So that could easily solve your "finding the killer" step.</p>
<p>Next, you could, for every time CharacterAdded fires, insert a ... |
0 | [SOLVED] Lobby Queue System Doesn't Teleport Players To Private Server? | 1680108820 | JmoneyPlayzOfficial | 49 | 2023-03-17 06:14:35 | <p><em>I got the script from a youtube video and just edited some stuff i guess</em></p>
<p>https://www.youtube.com/watch?v=bxCKWMiV8CA</p>
<p>so this script is supposed to act like a casual story game lobby system, there's a timer and every time the timer ticks to 0, the players in the queue will get a loading screen ... | 133203 | ||||||||
0 | GetPlayerFromCharecter | 1144900 | DeveloperAtWork | 14 | 2014-03-02 00:50:52 | <pre class='brush: lua'>function onTouched(part)
if part.Name == "Left Leg" or part.Name == "Right Leg" then
local player = game.Workspace:GetPlayerFromCharacter(part.Parent)
player.leadstats.Money.Value = script.Parent.Money.Value+player.leadstats.Money.Value
script.Parent.Parent.Main:remov... | 423 | 1 | 735 | 3 | 31265920 | Azarth | 3141 | 2014-03-02 00:55:17 | <pre class='brush: lua'>local main = script.Parent.Parent:WaitForChild("Main")
function onTouched(part)
if part.Name == "Left Leg" or part.Name == "Right Leg" then
local player = game.Players:GetPlayerFromCharacter(part.Parent)
local leaderstats = player and player:findFirstChild("leaderstats")
... |
0 | Is there an InputBegan:Connect for only mouse button 1 clicks? | 107860801 | phantomforcesdeath | 9 | 2021-07-22 04:27:29 | <p>I'm trying to use the user input service to detect when the player has made a left click, this is the code that im using:</p>
<pre class='brush: lua'>local function CheckInput()
if (UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1)) then
--blah blah blah
end
end
UserInputService.... | 125577 | 1 | 114269 | 0 | 1798342096 | ArsonMcFlames | 363 | 2021-07-22 05:07:58 | <p>If you want UserInputService to detect if the left mouse button is clicked, you would use Enum.UserInputType.MouseButton1</p>
<p>For example.</p>
<pre class='brush: lua'>local UIS = game:GetService("UserInputService")
function inputBegan(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
... |
0 | How to break out of while true loop when getting a remote function fire? | 138111508 | Jack_Hase | 85 | 2019-07-28 14:53:07 | <p>EDIT : Some of my scripts have worked on this, but they were too laggy (0.1 fps)
Okay, i was making a game where there's a timer and leaderboard , with a start / end point
This is my local script, parent of the timer gui</p>
<pre class='brush: lua'>--a = 0
local RS = game:GetService('RunService')
--RS:BindToRenderSt... | 84590 | 2 | 78519 | 1 | 61790180 | MessorAdmin | 598 | 2019-07-28 18:53:06 | <p>Very simple. use a break and a boolean value</p>
<p><em>SERVER SIDE</em></p>
<pre class='brush: lua'>local Event = game.ReplicatedStorage:WaitForChild("RemoteEvent")
local BreakLoop = false
spawn(function() -- I put a spawn here so that I can continue with code below the while loop its basically a coroutine, but it ... |
0 | Trying to format text in string to change color of font? | 99490951 | Troxure | 87 | 2022-05-03 01:05:29 | <p>Hi there, I am trying to change the color of specific terms in a string. For example, I would want certain words a different color than the rest, basically syntax. However I am running into issues and the text is not changing colors. The TextBox has RichText enabled too.</p>
<p>Here is the script:</p>
<pre class='br... | 129898 | ||||||||
0 | Roblox spawn points and leaderboard not working? (with script) | 470974064 | 2mania | 2 | 2022-05-06 20:57:37 | <p>Hi I was testing out a leaderboard thingy and basically if its set to 1 then you go to one spawn point but if its set to 2 then you go to another here is the script lmk if I did something wrong I need help :(</p>
<pre class='brush: lua'>local players = game:GetService("Players")
game.Players.PlayerAdded:Connect(func... | 129932 | ||||||||
0 | How do i do this to badges... | 56281052 | YoullbekilledsAlt | 0 | 2014-02-18 04:49:27 | <p>For instance, in Asimo3089's Coastline highway, when you collect all badges you get an in game ro-tercycle, how would i do that to my game, a reward for badges?</p>
| 58 | ||||||||
0 | How do I make a TextButton able to sell a developer product and then give the product to the buyer? | 1940100 | 67high | 10 | 2014-06-01 01:55:34 | <p>I've looked at quite a few places and I can't find a script that quite does what I need.</p>
| 5960 | ||||||||
0 | How to change orientation and CFrame? | 3401217 | WaldoWallace | 0 | 2017-07-24 01:02:43 | <p>So I'm making this crate where if you click it, it opens up to be a Coin or a Heart. Now, with the heart, it seems to be fine when I set the CFrame of it to the center of the crate (keep in mind the heart and coin have spinning scripts) and it goes to the desired center of the crate using CFrame. However, when the c... | 45688 | ||||||||
0 | How do I add a sound effect when the button is hovered over? | 999502939 | Dragonboy99711 | 5 | 2020-05-16 05:56:13 | <p>Heya guys, this is my first question apparently. Well, I'm trying to make a button that makes a sound effect when the mouse is hovering over it. I don't know how to make a script for it so I'll need some help.</p>
<p>The Script I attempted,</p>
<pre class='brush: lua'>script.Parent.MouseButton1Click:Connect(function... | 103323 | ||||||||
1 | How to make your game free to edit/take ?? Just wondering!! | 1481596727 | shime1122 | 6 | 2020-05-03 13:02:06 | <p>I want share my game to some friend but don't know how to turn on the free to take mode , can someone help me??</p>
| 101723 | 2 | 93963 | 2 | 467337150 | XDvvvDX | 186 | 2020-05-03 13:05:18 | <p>This is a pretty simple thing to do. I will answer this question for you very shortly:</p>
<p><strong><em>1) Go to the requested game.</em></strong></p>
<p><strong><em>2) Click on the 3 dots right to the name.</em></strong></p>
<p><strong><em>3) Select " Configure this place".</em></strong></p>
<p><strong><em>4) Cli... |
1 | how do you fix Argument 1 missing or nil error from egg hatching system? | 1241159283 | guuguu058 | 9 | 2022-06-19 18:13:46 | <pre class='brush: lua'><br /></pre>
<p>Hope you are having a good day. I am just here to say I have watched Alvinblox's egg hatching system tutorial and I am currently at part 2. There is a new error called "Argument 1 missing or nil" it is at line 60 in the petFollowPlayer script (local pet = game.ReplicatedStorage.H... | 130410 | 1 | 117747 | 0 | 754480402 | sleazel | 1282 | 2022-06-19 19:43:22 | <p>You are missing an argument 1. Quick look at the line 60 of Your code reveals that the argument missing is <code>petName</code>.</p>
<pre class='brush: lua'>local pet = game.ReplicatedStorage.HatchablePets:FindFirstChild(petName)
</pre>
<p>Where is that argument coming from? Going back a little bit, You will find th... |
0 | My DataStore Is Not Working To Save Players Leaderstats Any Way To Fix This? | 1139499518 | Ferceplay78y | 0 | 2023-02-24 02:33:50 | <p>So im having trouble with saving players leaderstats and im kind of new to datastores and note I was watching thedevkings video so idk what I did wrong.</p>
<pre class='brush: lua'>local plr = game:GetService("Players")
local DSS = game:GetService("DataStoreService")
local MyData = DSS:GetDataStore("MyData1") -- get... | 133112 | ||||||||
0 | RemoteEvent Wont Play Song? (Updated Script) | 1680108820 | JmoneyPlayzOfficial | 49 | 2023-02-14 21:04:50 | <p>im making a script that when you press a TextButton, it fires a RemoteEvent and changes the value of a string value to the value in the button, (the value being the name of the sound) then it will stop the previous song and start the new one but it wont play the sound, can someone help, thanks</p>
<blockquote>
<p>Cl... | 133072 | ||||||||
0 | Magnitude, Touched or other? | 49776603 | TomsGames | 225 | 2014-02-19 16:23:55 | <p>Alright I'm a bit stuck in the making of my game. If you want to have a look at this game so far here is the link:</p>
<p>http://www.roblox.com/Traffic-Racer-place?id=146148373</p>
<p>Ok so if you've checked out the game you'll notice whilst driving the car if you hit another car nothing happens. This is obviously t... | 90 | 3 | 183 | 1 | 1546726 | nate890 | 495 | 2014-02-19 18:33:50 | <p>Interesting problem you are having there. Unfortunately, there really is no way to detect when the car hits another car. Using touched events (if it worked) would be very inefficient and using magnitude would also be inefficient. The best way to go upon doing this, and you're probably not going to like this at all, ... |
0 | How do I script it so the max health is always = to a leaderstat? | 190357083 | THUNDER_WOW | 149 | 2020-07-06 20:32:31 | <p>What evert he leaderstats is or if it even changes I want the maxhealth of a player to equal to it. Ive tried many things but I can't seem to change the max health being always = to a leaderstat. My leaderstat script is fine.</p>
| 108376 | ||||||||
0 | How can i add a cool down to this key bind magic script? | 364796628 | Funnyskyswagway3 | 30 | 2020-07-12 00:49:27 | <pre class='brush: lua'>Player = game.Players.LocalPlayer
repeat wait() until Player.Character
c = Player.Character
mouse = Player:GetMouse()
mouse.TargetFilter = workspace.AntiMouse
UIS = game:GetService("UserInputService")
UIS.InputBegan:connect(function(input, isTyping)
if isTyping then return end
if input.K... | 108825 | ||||||||
0 | TeleportToPrivateServer must be passed an array of players? | 99934304 | 14dark14 | 169 | 2021-09-19 16:04:24 | <p>The last couple of days I've been trying to make a script that teleports <strong>multiple</strong> people <strong>that are standing on a Part</strong> to a private server. And currently, I'm left with a script that partly works, but sometimes comes up with an error:</p>
<p>[ <em>TeleportToPrivateServer must be passe... | 127553 | ||||||||
0 | On death, play a sound? | 18731888 | iRzPWNzr | 20 | 2014-05-11 16:17:56 | <p>Hi, you've probably noticed that in ROBLOX Studio, in Soundscape, there is now "StockSound" objects. I want to use the sound "Victory" every time a player dies.</p>
<p>I've tried this:</p>
<pre class='brush: lua'>function OnDeath()
print("Death")
game.Soundscape.Victory:play()
end
</pre>
<p>But it doesn't se... | 4712 | 3 | 6341 | 0 | 6438406 | jbjgang2 | 37 | 2014-05-11 16:38:11 | <p>must be in a local script</p>
<pre class='brush: lua'>local player = game.Players.LocalPlayer
function Death()
print('Death')
game.Soundscape.Victory:play()
if player.Character.Humanoid.Health == 0 then
Death()
end
</pre>
|
5 | How to detect if a player presses a key? [Answered!] | 45803743 | DrCylonide | 158 | 2015-03-04 01:55:54 | <p>Hi. How would a script detect if a player has pressed a key on their keyboard? Is there a set function for this?</p>
<p>Thanks!</p>
| 15487 | 4 | 18597 | 11 | 13667373 | EzraNehemiah_TF2 | 3552 | 2015-03-04 02:14:37 | <p>Easy, first you can get a local script because of the <a target="_blank" href="http://wiki.roblox.com/index.php?title=LocalPlayer">Local Player</a>(MUCH MUCH MUCH MUCH Easier that way, like 500x easier) then we have to get the mouse using <a target="_blank" href="http://wiki.roblox.com/index.php?title=API:Class/Play... |
2 | How can you save a bool value or something with datastore? | 233224360 | mastercheeseit | 56 | 2020-10-17 18:17:28 | <p>So I just watched a video on Datastore and learned that you can save data even when you leave the server so here I tried to test it here look at my code but for some reason it won't save</p>
<p>I want to change it's value with an textbutton when it is clicked we turn true to bool value and when we click again it tur... | 114487 | 1 | 105168 | 3 | 126333053 | zamd157 | 1109 | 2020-10-17 18:44:05 | <p>It is not being saved because you are changing the value <strong>on the client, and the server doesn't see the change</strong>. What you should do is use a RemoteEvent to change it on the server. Here's how you set it up:</p>
<pre class='brush: lua'>-- create a RemoteEvent in ReplicatedStorage, and set the name to "... |
0 | Script that makes an image fade out doesn't work? | 824069483 | epoke466 | 17 | 2021-02-21 21:44:26 | <p>This script isn't working can someone help me?
Its suppost to make 1 image fade in and the other fade out using the repeat until loop.</p>
<pre class='brush: lua'>local z = script.Parent
while true do
repeat
wait(0.1)
z.a.ImageTransparency = z.a.ImageTransparency - 0.01
until
z.a.ImageTra... | 120483 | 1 | 109866 | 0 | 14277028 | rodrigo455 | 558 | 2021-02-21 22:21:38 | <p>I explained everything that I did in the script. Hope this works.</p>
<pre class='brush: lua'>local z = script.Parent
while wait() do -- same as while true, but yields 1/30th of a second
local index = {"a","b","c","d","e"}
for _, v in ipairs(index) do
-- iterates through the table "index
loca... |
0 | Any easier way to write this? | 25516360 | Zerio920 | 285 | 2014-12-23 07:45:00 | <p>The Wiki says I can record key presses in a table to determine whether the key is being held or not, so something like</p>
<pre class='brush: lua'>local keys = {}
mouse.KeyDown:connect(function(key)
keys[key] = true
end)
mouse.KeyUp:connect(function(key)
keys[key] = nil
end)
while... | 13540 | ||||||||
0 | Roblox Studio Script Supposed To Spawn Twelve Models Every Eight Minutes.. Not Working? | 906277159 | TheKittyKingOfficial | 2 | 2023-01-24 01:34:15 | <p>Hello! I am currently trying to make a Roblox Script that randomly takes twelve Models out of a folder, and then puts them into twelve positions. Then, after eight minutes, this should repeat again. Also, every time I test it, the models do not have the same rotation as they did and sometimes, one model will spawn, ... | 132928 | ||||||||
1 | How do I make a smoothly changing text label? | 461604490 | 2Loos | 145 | 2020-10-09 23:53:21 | <p>First of all, the script I wrote doesn't even work, does anyone have a fix for this?</p>
<pre class='brush: lua'>wait(1)
local textcolor = script.Parent.TextColor3
while true do
textcolor = Color3.new(1, 0, 0)
wait(1)
textcolor = Color3.new(1, 0.470588, 0.0941176)
wait(1)
textcolor = Color3.new(1... | 114190 | 1 | 104821 | 2 | 688375655 | Windsonnes | 75 | 2020-10-10 00:22:39 | <p>This made me cackle! It does work, man. The problem here is that you forgot that Color3s RGB value can range from <code>0,0,0</code> to <code>255,255,255</code>. It changes color, but it's just too dark for you to notice!</p>
<p>For example, a really green color can be defined as <code>0,255,0</code>. Red as <code>2... |
0 | Script in gui opening other players' guis? | 377679694 | TheB4dComputer | 100 | 2021-08-07 00:41:38 | <p>I have this local script that when an Image Button is clicked, it opens a gui called "Frame". The frame is used for editing inventory stuff, which raises an immediate problem, trolling. I have no idea why the gui is opening another gui rather than itself.</p>
<p>The bug only happens when multiple people are in the s... | 126193 | ||||||||
0 | Model:SetPrimaryCFrame() failed because no PrimaryPart has been set? | 529096024 | Chmurskyy | 0 | 2021-02-23 17:25:39 | <hr />
<p>When i run the script it comes up with "Model:SetPrimaryPartCFrame() failed because no PrimaryPart has been set, or the PrimaryPart no longer exists. Please set Model.PrimaryPart before using this. - Server - Script:7". I Have no idea how to fix this, any help ?</p>
<pre class='brush: lua'>_G.deadzombies = 0
... | 120573 | ||||||||
1 | What formula can print seconds into minutes:seconds? | 25516360 | Zerio920 | 285 | 2015-04-09 01:28:44 | <p>Using this for a timer I'm making.</p>
<p>So say for example, I have a script read a number from a value object, holding an amount of seconds. Then the script would print in the output the amount of minutes:seconds that would equal. I'm having trouble thinking of something that can do that. Help is appreciated.</p>
| 16515 | ||||||||
0 | How do I set the local players camera to the front surface of a block? | 1546980603 | Jakob_Cashy | 67 | 2021-10-11 22:45:55 | <p>i wanna make the character look at a item, and a blocks front surface is the view point, but when i step on the block, it says: Attempt to index nil with "Camera" on line 10?</p>
<pre class='brush: lua'>--Variables--
local Brick = script.Parent
--End--
--Code--
local function PlayerTouched(Part)
local Parent = P... | 127844 | ||||||||
1 | How to make a SurfaceGUI switch peoples teams and kills them? | 1680108820 | JmoneyPlayzOfficial | 49 | 2022-10-16 09:12:34 | <p>I want it so when I press a surfaceGUI text button it switches teams of the player and kills the player</p>
<p>I tried something like this for the team switching
<code>Game.Players.LocalPlayers.Teams = [“White”]</code></p>
<p>Does anyone know how to do it because I’m bad at coding</p>
| 131936 | 1 | 119155 | 1 | 215237638 | LikeableEmmec | 470 | 2022-10-16 14:21:19 | <p>Hello! I believe I have a solution..
Insert a <code>RemoteEvent</code> into <code>ReplicatedStorage</code>. Call it <strong>ChangeTeam</strong>.
Insert a LocalScript into StarterGui and insert this:</p>
<pre class='brush: lua'>local p = workspace["YourPartName"]
local sg = Instance.new("SurfaceGui",game.Players.Loca... |
0 | My updating variable every second script doesn't work, can you help? | 1559368879 | pugguy1000 | 3 | 2021-04-05 18:48:54 | <p>Hi there!
I'm making a game where the players' points update by one every second. I need the points to start updating only when the player steps on a model, called "Game." Here is my script, which doesn't work.
I hvae tried many times to fix this, but all attempts were unsuccessfull. (I would have added those attemp... | 122045 | ||||||||
0 | attempt to perform arithmetic (div) on nil. How to fix? | 964880605 | fantir13 | 0 | 2022-09-21 19:06:07 | <p>I'm a small game creator
i have a problem with Base Health in my TD game
how to fix it?
problem is:
ServerScriptService.Main.Base:20: attempt to perform arithmetic (div) on nil
Help pls</p>
<p>~~~~~~~~~~~~~~~~~
local serverstorage = game:GetService("ServerStorage")</p>
<p>local Bindables = serverstorage:WaitForChild... | 131688 | ||||||||
0 | How to correct position with scaling in a script? | 215833213 | Stiles8353 | 6 | 2022-10-05 01:23:47 | <p>I have a script that makes a plant grow, and currently the script makes the bottom part, the primary part, always be touching the floor/baseplate. But that only works when it is already touching the baseplate. Moving the plant up causes it to reposition upwards more than it should. Any help?</p>
<pre class='brush: l... | 131801 | ||||||||
0 | ImageLabel not hiding when clicking a TextButton? | 2064359146 | GamerLighting23233 | 63 | 2022-07-12 08:07:38 | <p>I'm making a ghost hunting game, where you have a camera system. When I click the TV it works perfectly fine and opens up GUI but when I click <code>Close</code> button it just hides login frame and the button and not the camera overlay/cameras frame.</p>
<p>Server script (in ClickDetector):</p>
<pre class='brush: l... | 130757 | ||||||||
0 | How do I set a cooldown for spawning in blocks? | 813441209 | dannybuns03 | 11 | 2023-02-01 23:26:52 | <p>I want to be able to spawn a block when you click a gui and I got this.</p>
<pre class='brush: lua'>local button = script.Parent
local part1 = script.Parent
local part2 = workspace.partspawn
local clickdetector = button
local function spawnPart()
local newPart = Instance.new("Part")
newPart.Parent = workspac... | 132995 | 1 | 120108 | 0 | 433962773 | theking66hayday | 841 | 2023-02-01 23:40:07 | <p>Try using <code>task.wait(2)</code> this should work just implement it somewhere in your script.
Also you can change 2 to how long you want to <code>wait()</code> Hope this helps!!</p>
|
0 | How to check if string contains certain word? | 18682931 | Seyfert | 90 | 2017-01-18 20:58:41 | <p>I am trying to make ice cream choices, if the customer's dialog contains certains keyword it is supposed to change the name of an IntValue, problem is my if statements seem to be messing up and it is choosing the wrong value.</p>
<p>My script first checks how many scoops they have, one or two, then it goes by flavor... | 39155 | ||||||||
0 | Is this Possible? | 14411926 | Anciteify | 70 | 2015-05-09 17:36:49 | <pre class="brush: lua">function getLocations(obj)
for i, v in pairs(workspace["Group Teleporters"]:GetChildren())do
if(v.Name == "InstantTeleport")then
local val = Instance.new("ObjectValue", obj)
val.Name = v.LocationName.Value
val.Value = v
end
end
end
</pr... | 17393 | ||||||||
0 | Need help making a cell/bars script for roblox studio prisoners team. Can anyone help me ? | 12114108 | s08qz6kpm2ofdqwg6n9n | 0 | 2023-01-11 22:22:17 | <p>In general I need a script when a player spawns in a cell then the bars close you can specify any variable for the bars and position ( I will change it later ) and the idea is that if he spawns because you select it ago or because he died then the bars close and on the board above the cell I also write who is sittin... | 132812 | ||||||||
0 | Difficulty getting image to pop up? | 1703596758 | GoAwayNOOB124 | 0 | 2020-06-21 03:16:12 | <p>I can't get the image to pop up when I use this script. Everything in the Explorer is named correct.</p>
<pre class='brush: lua'>local carSeat = game.Workspace.ParkingLot.Char
local cashMoney = script.Parent
while carSeat.Position.Y < 5 do
cashMoney.Visible = true
script.Parent.Visible = true
wait(2)
... | 106960 | ||||||||
0 | I want to change the camera mode to first person when touching a part? | 95706501 | HimoutoUmaruDomaChan | 20 | 2017-12-24 23:28:29 | <p>I don't know how to do this, I am an amateur coder who used to raid the library in hoping of finding a script that'll help. But now that I'm using this, I can finally get help. So I want to change the camera to first person when they touch a part, but when they die, it switches back to the regular camera mode.</p>
<... | 50879 | ||||||||
0 | How can I use the arrow keys to navigate a GUI? | 112391394 | jmarsh33 | 0 | 2020-07-31 22:02:33 | <p>Is there a script I can use that allows the player to use their arrow keys to navigate a gui? Thanks in advance.</p>
| 110411 | ||||||||
0 | How do i make an animation on a part play when a player touches it? | 147305218 | PeterParker17386 | 16 | 2022-12-28 23:17:32 | <p>So i have been trying to make a door animation play when touched, i tried searching it up because i had no idea how to do it and all i could see were scripts on how to make the animation play for a humanoid instead of an object, but since i have to add code or my question will get deleted, i will add this:</p>
<pre ... | 132689 | ||||||||
0 | How do I get my OBBY stages to add up on the leaderboard? | 78202180 | AaronJMLP | 2 | 2020-10-01 12:57:32 | <p>I got a leaderboard to work which shows the world and stage, Now I want it that when I jump on a checkpoint the stage goes up on the leaderboard and when I die I spawn at the Checkpoint but I can't get it to work. I neither respawn at the checkpoint nor does the stage go up on the leaderboard.</p>
<p>Here is the cod... | 113886 | 1 | 104532 | 0 | 335945120 | Blackbooks | 138 | 2020-10-01 13:36:21 | <p>Your mistakes are :
You make the same variable twice</p>
<pre class='brush: lua'>game.Players.PlayerAdded:connect(function(player)
local leaderstats = Instance.new("Model")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local money = Instance.new("IntValue")
money.Name = "World"
... |
0 | How to determine if a number is an integer? | 159200888 | RetroGalacticGamer | 331 | 2020-03-21 20:20:47 | <p>So, Yes, I know ho to make a function to do this. But, I am wondering if type() or typeof() have a string for integer that they return, just to make things simpler. So, is there one? Because if you do this:</p>
<pre class='brush: lua'>local thingy = "str"
if typeof(thingy) == "string" then -- tells you if the string... | 96646 | ||||||||
0 | Can anyone help me understand why it is not working when my character respawns? | 40621453 | JerkDerekThe14alt | 11 | 2022-05-09 17:20:02 | <pre class='brush: lua'>local owner = script.Parent.Owner
local physics = game:GetService("PhysicsService") --The service that lets you create collision groups.
physics:CreateCollisionGroup("Door") --Create the door collision group.
physics:SetPartCollisionGroup(script.Parent,"Door")
physics:CreateCollisionGroup("Owner... | 129969 | ||||||||
0 | How can i apply physics impulses/set a part's velocity relative to itself or another part? | 929847335 | TheDude646 | 72 | 2022-08-04 05:16:53 | <p>i'm trying to make a gun that ejects bullet casings out of its ejection port to the right, but every method i've found regarding setting/changing velocities is relative to the world so the casing always flies to the "east" so when i move the casing starts going in the wrong direction.</p>
<p>the methods i've tried s... | 131092 | ||||||||
0 | 'DataStoreSerivce' is not a valid Service name | 5762824 | Gamenew09 | 180 | 2014-03-14 02:53:34 | <p>When I do the first line of the script calls it does the following error:</p>
<blockquote>
<p>21:47:02.705 - 'DataStoreSerivce' is not a valid Service name
21:47:02.706 - Script 'ServerScriptService.Script', Line 2
21:47:02.708 - stack end</p>
</blockquote>
<p>The script:</p>
<pre class='brush: lua'>local Mark... | 677 | 1 | 1090 | 5 | 13416513 | Merely | 2122 | 2014-03-14 05:20:15 | <p>It is spelled "DataStoreService" not "DataStoreSerivce"</p>
|
0 | How do I fix this ServerEvent on this Tank? | 32730446 | DesiredToResign | 10 | 2022-09-20 22:14:33 | <pre class="brush: lua">if game.ReplicatedStorage:FindFirstChild("TankStuff") then
game.ReplicatedStorage.TankStuff:Destroy()
print("previous instaler destroyed")
end
script.Parent.TankStuff.Parent = game.ReplicatedStorage
script.Parent.ReplicatedStorage.TankGunsFolder.Parent = game.ReplicatedStorage
for _, chi... | 131683 | ||||||||
0 | How to raycast from the camera and deal damage with it? | 1044984225 | datboyPiter | 52 | 2021-05-22 18:11:30 | <p>I am making a pistol but can't figure out how to raycast from camera, can someone help?</p>
| 123688 | ||||||||
0 | How would you make this Gui teleport to more than one of the same part? | 22187857 | Pawsability | 65 | 2015-01-28 04:57:17 | <p>I have multiple parts named <strong>"MainTeleportPart"</strong> in the Workspace that I want to be able to teleport to, but it only teleports to one of them until the server restarts, then it's a different one over again. How would I be able to do that?</p>
<pre class='brush: lua'>script.Parent.MouseButton1Down:conn... | 14576 | ||||||||
0 | The game pass item wont give me the item in game when i buy it? | 174478614 | fluffydoggy0804 | 0 | 2021-01-12 21:39:02 | <p>I am make A ROBLOX game and I have mad two game passes and I have put the into the shop but and made the scripts and the items where they should be And when I test the game and "buy" the game pass it doesn't give me and error it just does give me the item in my tool bar.</p>
<p>Sever script:</p>
<pre class='brush: l... | 118606 | ||||||||
3 | How do I remove player`s hat/hair? | 345256394 | HeyItzDanniee | 252 | 2018-06-13 11:54:44 | <p>I am trying to remove players hat, or in my case, hair. But it doesnt seems to work. I have a morth type of thing that when you <strong>touch a brick</strong> (button) it makes my body invisible and sticks random bricks on the body to make an armor or something.</p>
<pre class='brush: lua'>function onTouched(hit)
... | 60253 | 4 | 58634 | 2 | 185845822 | Astralyst | 389 | 2018-06-13 12:04:00 | <p>https://wiki.roblox.com/index.php?title=API:Class/Accessory</p>
<p>Don't use "Hat", use "Accessory".</p>
<pre class='brush: lua'>if (d[i]:IsA("Accessory")) then
d[i]:Destroy()
</pre>
<p>also, use :IsA instead of .className ==</p>
|
0 | How to make a double tap dash system script? | 103518855 | Cyrellejheff | 11 | 2020-04-01 11:46:34 | <p>I don;t know how to make it into a double tap that's kinda my problem
and also the direction of the dash ;/</p>
| 97756 | 1 | 90310 | 0 | 473052976 | nkminion | 21 | 2020-04-01 12:53:54 | <p>This might help you:</p>
<p>https://www.youtube.com/watch?v=1aAKsAbeSu4</p>
<p>I don't know If I'm allowed to send links</p>
|
0 | Why does this script not find the player in workspace? | 214710102 | iiConstable_Subwayx | 130 | 2020-03-17 23:45:40 | <pre class='brush: lua'>game.Players.PlayerAdded:Connect(function(player)
wait(2)
game.Workspace:FindFirstChild(player.Name):Destroy()
end)
</pre>
<p>Alright, This should always work, It sees when a player joins, then takes one of the values under the player, The name and finds it in the workspace. The model always... | 96320 | 1 | 89010 | 0 | 1169362290 | iiMxtt_Destinyii | 62 | 2020-03-17 23:50:53 | <p>Here is an attempted fix of your code.</p>
<pre class='brush: lua'>game.Players.PlayerAdded:Connect(function(player)
player.Parent:FindFirstChild("Humanoid")
wait(2)
game.Workspace[player.Name]:Destroy()
end)
</pre>
|
0 | Why cant i download a 22 KB file to decals? | 1496070996 | dorukpro456123 | 0 | 2022-06-19 07:08:36 | <p>Im trying to download a 22 KB file to decals for my game but i couldnt. It keeps saying bad request Error: 400 and im so sick of it. Please help me.</p>
| 130402 | ||||||||
0 | Plugin Methods | 24324045 | Trewier | 146 | 2014-03-06 17:45:31 | <p>Hello, so I am making a plugin that does something when you click. So what I want to happen is:
Player clicks plugin button
Player clicks in workspace wherever they want
Function executes and spawns block at that location
Function resets so it can be used again</p>
<p>But, when I click on the button, and then click ... | 524 | ||||||||
0 | How can I call a function from a function which is above the function? | 498916107 | StrategicPlayZ | 58 | 2019-01-04 18:15:59 | <p>In my script there are many functions. I want to call one function from the other, but the problem is that the function which will be calling another function is above the function it will be calling, and not below it so it is giving me errors. You might be saying to switch the places, but in my script there are a l... | 73774 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.