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 | How do i fix " Expected identifier when parsing expression, got )"? | 131427586 | WatsPlayzROBLOX | 80 | 2020-06-01 09:22:20 | <p>I wanted to make a Gui that only appears for my friends, this is what i got so far, yet everytime i try to fix it it has the same output, Expected identifier when parsing expression, got ')'
Here is what i have so far:</p>
<p>local adminReward = script.Parent.Parent.Parent
local adminNameHolder = Script.Parent</p>
<... | 105002 | 1 | 96811 | 0 | 1155618520 | Lightning_Game27 | 232 | 2020-06-01 10:50:43 | <p>You added a () at the end in the "end" function. You are not supposed to do that at all in Lua. You can only write "end)" and it is only used when closing a function that starts with "(function". For example:</p>
<pre class='brush: lua'>script.Parent.Touched:Connect(function
--Function goes here
end)
</pre>
<p>A... |
1 | How do I tell if a lookVector points to right/left of another one? | 47838784 | Supint | 60 | 2015-05-07 23:10:11 | <pre class="brush: lua">if VEC1.X > VEC2.X then
bool = true
else
bool = false
end
</pre>
<p>That's what I'm trying right now. VEC1 and VEC2 are lookVectors. It works mostly, but the true and false values seem to switch like four times over a 360 rotation. I think I know why, but I can't find an alternative. ... | 17346 | 1 | 20740 | 3 | 19566737 | Unclear | 1776 | 2015-05-08 03:28:40 | <p>Vectors do not have enough orientation information for you to determine a right or a left. To do this, we will need two references to CFrames rather than vectors. For simplicity, I will use <code>cfSource</code> and <code>cfOffset</code>as variables referencing our two CFrames. We are trying to find if <code>cfOffse... |
1 | what Does "While True Do"Means? | 56555356 | Wilbert026 | 10 | 2014-07-25 19:49:05 | <p>I Was Watching A Video About Scripting So I Saw That The Guys Put "While True Do"
At The Top Of The Script
I Know That "While True Do" Is A Key Word Because I Saw It Turn On Blue When the Guy In The Video Add It To The Script
The Video Was About Transparency So I Don't Know What Its Means</p>
| 8680 | ||||||||
0 | Increasing a players walkspeed by purchasing with coins not working correctly? | 1418370301 | cats76799 | 0 | 2020-10-17 18:22:14 | <p>The code below in supposed to subtract 100 coins from the player (This works) and add +1 walkspeed everytime it is purchased but for some reason it in not working.</p>
<p>code:</p>
<pre class='brush: lua'>game.ReplicatedStorage.Events.SPHandler.OnServerEvent:Connect(function(player)
if player.leaderstats.Coins.V... | 114488 | ||||||||
0 | How does FindPartOnRay work? | 958002 | Mystdar | 352 | 2015-12-26 21:25:35 | <p>So on the <a target="_blank" href="http://wiki.roblox.com/index.php?title=API:Class/Workspace/FindPartOnRay">wiki</a> it says it triggers when a part intercepts your ray, but can someone, using code, explain how I would execute this as;</p>
<pre class='brush: lua'>local part, endPoint = Workspace:FindPartOnRay(ray)
... | 25641 | 1 | 29223 | 1 | 23139876 | JayManLive | 15 | 2015-12-26 23:57:19 | <p><code>Workspace:FindPartOnRay(ray)</code> does as it's told (Finds a BasePart that is colliding with the ray closest to the ray's origin, like a laser hitting a wall).</p>
<p>In your case, <code>part</code> is the BasePart that the ray has collided with, and <code>endpoint</code> is the location of the collision, a ... |
1 | I have an npc that shoots at the player but it damages more than expected. Why?? | 1380041932 | Boyuanbogosess | 13 | 2022-08-06 00:43:16 | <p>So i have this npc that shoots at the player but it damages more than expected example: when it shoots it hits the player and then it takes more than the expected damage. I have tried using debounce but its not working. The code part is from line 84 to 99</p>
<pre class='brush: lua'>local players = game:GetService("... | 131117 | 1 | 118441 | 0 | 190357083 | THUNDER_WOW | 184 | 2022-08-06 01:45:03 | <p>Line 085 should be on line 083.</p>
|
0 | Why can't I move while I'm testing in Roblox Studio? | 332339959 | idkwhattodoHELPmeplz | 0 | 2017-08-04 11:24:52 | <p>Hello,
I have a very bad problem! Every time when I try to test any game/project in Roblox studio I can't move my avatar or the camera . Here is the error codes which I see in my <strong>Output</strong> every time when I start a new project or load an existing one :</p>
<p>14:17:34.444 - Baseplate was auto-saved</p>... | 46210 | ||||||||
0 | Im trying to make a area where you have a item and its giving me a error. Why? | 98600858 | cjkizzy286 | 24 | 2020-10-17 17:09:15 | <p>I am trying to make a area where it gives you the item when your in it and takes it when your not and it don't work pls help.
Aso i am getting the error on the first code of " 17:55:17.115 - Workspace.Part.Script1:3: attempt to index nil with 'Backpack'"</p>
<pre class='brush: lua'>while true do
script.Parent.To... | 114483 | 1 | 105159 | 0 | 366734064 | JeffTheEpicRobloxian | 216 | 2020-10-17 17:22:37 | <p>I think you've got the whole concept of <code>MoveTo</code> wrong. First off you use <code>MoveTo</code> to move an object with a humanoid to a <code>Vector3</code> position.
For More Detail On '<code>Humanoid:MoveTo()'</code> click this API link:
<a target="_blank" href="https://developer.roblox.com/en-us/api-refer... |
0 | I'm trying to make a AI car that can Follow a path and stop? First time making a function. | 14411926 | Anciteify | 70 | 2015-04-29 18:53:45 | <p>Ok so as the title says I'm trying to make an AI Car that can Follow a Path and Stop at certain points in that path, but since I'm still somewhat new to the world of scripting (Should of learn how to script 7 years ago... that's how long I been playing this game...) I don't what to put in my function to make it to f... | 17115 | ||||||||
0 | player head increase in size ? | 1234901344 | Dxv_ne | 0 | 2022-10-31 01:48:26 | <p>How could i increase my players head size every second heres my script so far :</p>
<p>game.Players.PlayerAdded:Connect(function(player)
local Humanoid = player.Character.Humanoid
while wait(1) do
Humanoid.HeadScale.Value = Humanoid.HeadScale.Value + 1</p>
<p>end
end)</p>
| 132093 | ||||||||
0 | Remote behaviour when passing animationtracks? | 39009121 | Hakurem | 30 | 2018-04-17 18:01:20 | <p>Note! Im trying to make people able to reproduce this and test themself and maybe we can come to a conclusion on how to solve this case. Warning: There might be alot to read for those who like short questions.</p>
<p>I have noticed passing animationtrack client to server or opposite results in nil. So for a workarou... | 56999 | ||||||||
1 | How to make it where you can accidentally burn food when cooking? | 238838551 | PadmeOragana | 41 | 2019-12-16 19:08:55 | <p>I am making a cooking game and I want to make it where if you click it in time, then it gives you a bacon tool or something, but if you don't, in five seconds, it will burn. I already made the burning part but I don't know how to make it where, like I said, if you don't get it in five seconds then it happens. Thanks... | 91488 | 1 | 84702 | 1 | 675757462 | maumaumaumaumaumua | 624 | 2019-12-16 19:32:09 | <p>You can use coroutines to make a wait and not pause the thread (or just put the wait at the end)</p>
<p>Also, using MouseClick will always do a new function and putting a wait wont work.</p>
<p>Use this code:</p>
<pre class='brush: lua'>local connection
function onClicked()
local ToolNames = {"CookedBacon", "Item", ... |
0 | attempt to call a RBXScriptSignal value, why? | 671376424 | EpicEyeBall_007 | 25 | 2020-07-06 03:58:50 | <pre class="brush: lua">script.Parent.TextButton.MouseButton1Click(function()
workspace.Gravity=300
end)
script.Parent.TextButton2.MouseButton1Click(function()
workspace.Gravity=100
end)
</pre>
<p>if i try to run this script it returns this error in the title, Players.EpicEyeBall_007.PlayerGui.ScreenGui... | 108322 | ||||||||
0 | Data Store is not working as attended? [Solved] | 167536064 | MelodicSea5914 | 21 | 2020-09-20 17:43:44 | <p>Hi, so I have a strength leaderstat which should save when I leave the game. However, it does not do that. I have turned API Services on and have a bool value in server storage named SaveInStudio and the value is true. Can anyone help please?</p>
<p>Script:</p>
<pre class='brush: lua'>local DataStore = game:GetServi... | 113411 | ||||||||
0 | if game.Workspace.setup.Value == 1 then is running when value is 0. whats going on? | 342121749 | codingMASTER398 | 52 | 2019-06-28 22:15:00 | <p>so. I have made a script to clone spheres.
<strong>question 1:</strong> do the scripts of clones run when created?
<strong>question 2:</strong> if not, how do you make it run?
<strong>question3:</strong> so the script, first when the game runs then a setup part of the script runs, NOT the script I want the clones to... | 82622 | ||||||||
0 | Will you help me with my GUI tool giver script? | 23899683 | Japhie | 20 | 2014-07-18 13:59:40 | <p>This is what I've tried:</p>
<pre class='brush: lua'>local Tool = game.Lighting.Tool
local player = game.Players.LocalPlayer
function onClick()
game.Workspace[player.Name].Torso.CFrame = CFrame.new(Vector3.new(0, 5, 0))
if script.Parent.Visible == true then
script.Parent.Parent:Destroy()
end
end
... | 8309 | 2 | 10772 | 0 | 47908389 | mrgeorge12345 | 45 | 2014-07-18 15:12:48 | <pre class='brush: lua'>local Tool = game.Lighting.Tool
local player = game.Players.LocalPlayer
function onClick()
player.Character.Torso.CFrame = CFrame.new(Vector3.new(0, 5, 0))
Tool1 = Tool:clone()
Tool1.Parent = player.Backpack
if script.Parent.Visible == true then
script.Parent.Parent:Destr... |
1 | How do I stop this script from 'over-cloning' ? | 102254161 | squidiskool | 185 | 2020-05-18 15:04:00 | <p>Hello, I have this script where fire spreads along with other scripts. It's not a virus, but I can make buildings fall apart using my method. I made this script where on touch it clones into the part it touched. But the scripts and the fire get over-cloned and Studio crashes.The scripts and the fire get cloned way t... | 103557 | 4 | 95587 | 1 | 11808841 | blowup999 | 562 | 2020-05-18 15:08:41 | <pre class='brush: lua'>function onTouched(hit)
if not hit:FindFirstChild("Fire") then
--for i,v in pairs stuff
end
end
</pre>
<p>The script checks whether or not a ParticleEmitter named "Fire" is within the part.</p>
|
0 | Weapon Ammo counter not working? | 920047179 | krankycaat | 11 | 2022-06-15 04:08:15 | <p>Hello, Ive been working on a custom weapon for my game and have come across this peculiar issue.
I had previous success counting down the ammunition by using a separate localscript from the raycasting/main one, but it fails to disable the raycasting script for some reason so I am trying to put the counter in the ray... | 130365 | 2 | 117714 | 0 | 532084574 | AnasBahauddin1978 | 715 | 2022-06-15 09:21:57 | <p>You are only removing the ammo when you hit a humanoid</p>
<p>Move the line of code</p>
<pre class='brush: lua'>if humanoid then
ammo = (ammo - 1) -- Remove this line
</pre>
<p>to</p>
<pre class='brush: lua'>if ammo >= 1 then
print(ammo)
ammo -= 1
</pre>
|
0 | How do I Make a part destroy after reaching 0 health? | 106244825 | oXDestroyerXo | 28 | 2021-03-14 07:47:15 | <p>I tried to make a part with a humanoid named pp and a script, after making those two I added</p>
<pre class="brush: lua">local p = script.Parent
local h = p:FindFirstChild("pp")
local hp = h.Health
if hp <= 1 then
p:Destroy()
end
</pre>
<p>Into the script, this didn't work and I'm wondering why because I'm n... | 121304 | 3 | 110514 | 2 | 74087102 | Ziffixture | 6913 | 2021-03-14 08:00:30 | <p>It's not that the code is so-called faulty, it's the fact that it reached the <code>EOF</code> and ceased execution. There is nothing yielding your program, therefore the conditional statement is evaluated upon runtime and then the program has nothing left to do; it finishes.</p>
<p>This is what we call a "semantic"... |
0 | How do I make a part play a sound when clicked? | 193993495 | virtua_blox657 | 0 | 2019-12-29 12:37:17 | <p>I've been trying to make a lantern play a switch sound when it turns on in Roblox Studio, but it hasn't been working. I've tried many different scripts, ClickDetectors, etc, but none of it is working.
I've been using this script along with a ClickDetector and a sound:</p>
<p>script.Parent.ClickDetector.MouseClick:Co... | 92159 | ||||||||
0 | my grid system doesnt work properly why? | 609694350 | thedukke1 | 9 | 2021-04-09 07:24:46 | <p>local mouse = game.Players.LocalPlayer:GetMouse()
local off = false
local plr = game.Players.LocalPlayer
local UIS = game:GetService("UserInputService")
local mat = Enum.Material.WoodPlanks
local color = BrickColor.new("Br. yellowish orange")
local eq = false
script.Parent.Equipped:Connect(function()
if mouse ~= nil... | 122175 | ||||||||
1 | How do I count how many players there are in a game? | 10186880 | wddd89 | 35 | 2014-03-07 21:46:53 | <p>Well, I need to know how to make it so the script knows how many players there are in the game, and if there's not enough it'll say "more members required to play." Yeah, this is of use in one of those "mini-games" games. It'll require a specific amount of players, let's just say four for now.</p>
<pre class='brush:... | 554 | 5 | 888 | 2 | 31265920 | Azarth | 3141 | 2014-03-07 21:49:22 | <pre class='brush: lua'>local mini = 4
while wait(1) do
if game.Players.NumPlayers < mini then
print("Waiting for ".. mini - game.Players.NumPlayers.. " more player(s) to join."
end
end
</pre>
|
1 | Does instance.new("Part", game.Workspace) create a new brick in the game when I run the script? | 13970097 | namelessassasin | 30 | 2014-04-23 22:22:44 | <p>If not then what does it do</p>
| 3386 | 3 | 4741 | 2 | 644283 | AmericanStripes | 610 | 2014-04-23 22:25:20 | <p><strong>Technically, no.</strong> There is an error in it.</p>
<pre class="brush: lua">Instance.new("Part", game.Workspace)
</pre>
<p>would create a new brick when ran.</p>
<p>Read more about instances <a target="_blank" href="http://wiki.roblox.com/index.php?title=Instance_(Table)">here</a></p>
|
0 | How do you let an player Resize an gui? | 539909602 | Retallack445 | 12 | 2020-09-15 00:35:16 | <p>So as i said in the Title i want to make a gui that a local player can resize like they can change the (x,y) axes.</p>
<p>is that even <strong>Possible</strong>?</p>
| 113172 | 1 | 103904 | 0 | 116361614 | deadwalker601 | 33 | 2020-09-15 01:08:19 | <p>First, this is possible and you asked just when I was finished making one!</p>
<p>We need to be able to start the resize so put a button in the frame.</p>
<p>Next we need to detect when the player starts the resize:</p>
<pre class='brush: lua'>local btnDown = false
local frame = --Path to scaling object
local button... |
0 | how can i record the time using roblox server? | 50605193 | johnnygadget | 50 | 2015-03-30 06:13:40 | <p>i have a script that gives player a perk for 24hours. sometimes it doesn't work because the request is taking too long and returning nil i think. i made some prints at key points throughout my script and sometimes it returns to me the print for "timed out" which means it's not getting the time. i have tested this an... | 16159 | 1 | 19390 | 1 | 6938329 | noliCAIKS | 210 | 2015-03-30 16:10:40 | <p>The problem is that the site is too slow. You could check if downloading the time worked and repeat until it worked correctly, but it would be a lot more efficient to use <a target="_blank" href="http://wiki.roblox.com/index.php?title=Function_dump/Basic_functions#os.time">os.time()</a> like M39a9am3R mentioned, whi... |
2 | how to make the first person who joins the server run the playeradded function? | 1222281551 | botw_legend | 452 | 2020-06-23 23:09:58 | <p>so i am making a game and the playeradded needs to run for the first person who joins the game how do i make that happen?</p>
| 107245 | 2 | 98646 | 1 | 377732425 | Galvaric | 24 | 2020-06-23 23:32:04 | <p>I would recommend using conditional statements along the lines of something like this</p>
<pre class="brush: lua">local function foo()
if #game.Players == 1 then
-- code here
else
return
end
end
game.Players.PlayerAdded:Connect(foo)
</pre>
|
0 | How can i make a Script to choose a random player? | 25016072 | NexeusX | 137 | 2014-04-16 15:12:11 | <p>I want to make a script like on the darkness game where it chooses a random player and puts them on a certain team how can i do this?</p>
| 2160 | 1 | 2903 | 1 | 3289648 | YaYaBinks3 | 110 | 2014-04-16 16:06:11 | <p>You can also do this in one line.</p>
<pre class='brush: lua'>local randomPlayer = game.Players:GetPlayers()[math.random(1,#game.Players:GetPlayers())]
</pre>
<p>Broken down:</p>
<p><code>game.Players:GetPlayers()</code> returns a table of all the players in the game</p>
<p>The <code>[]</code> brackets get something... |
2 | How would I make an ImageLabel rotate with the direction of the camera? | 532387 | Scriptos | 45 | 2014-02-21 01:13:22 | <p>I'm working on a mini-map, but I'm having problems with making the arrow in the center rotate to match the camera's rotation.</p>
<p>( Like in any RPG mini-map. The arrow points towards the direction you're facing.)</p>
<p>I've tried using lookVector and :toEulerAnglesXYZ(), but neither seem to work correctly.</p>
<... | 185 | ||||||||
1 | How would I create a TextBox that changes color if it's a certain word? | 1752698589 | teeth221 | 5 | 2020-08-02 01:23:48 | <p>So basically, I want a TextBox that changes the color of the text if it's a certain string. I'm creating a Runtime GUI (basically lets you do stuff while the game is running, like banning people or kicking people from the game) and I want it to be like a script interface that changes color for what you're doing. If ... | 110514 | ||||||||
0 | How to assign multiple values to one variable? | 342893559 | SilentKiller5557 | 6 | 2022-05-04 21:07:38 | <p>I need to assign multiple values to one variable.</p>
<p>I need multiple labels defined all in one variable.</p>
<p>I saw an example like this:</p>
<pre class='brush: lua'>local Text = script.Parent, script.Parent.Text, --and so on.
</pre>
<p>but it did not work for me.</p>
<p>This was the script:</p>
<pre class='br... | 129912 | ||||||||
0 | Help with my Admin Commands? | 32315530 | IcyEvil | 260 | 2014-07-11 04:06:04 | <p>I have tried to Fix this, as in Using different Methods, Such as or, but I thought you guys should see the source of the Problem And See if I am Missing anything.</p>
<pre class='brush: lua'>Replicants = {"amegaman","papertiger67"}
function Text(text,time,par,Texttype)
local m=Instance.new(Texttype)
m.Parent=par
m.T... | 7926 | ||||||||
0 | How do you use Color3? | 8828975 | offbeatpizzalives123 | 105 | 2014-11-11 02:35:21 | <p>I'm making a script in where you press 'z' a fire is inserted into your torso; in other words, a KeyDown event.
But I've never used Color3, a property of 'Fire'. All I've used is BrickColor
Heres my script:</p>
| 12362 | ||||||||
0 | Can I have help for my countdown Gui reach 00:00 please? | 1163400464 | wDaerkfeX | 37 | 2023-01-11 19:04:21 | <p>Hey guys I want to create a countdown gui and when the countdown is at 00:00, all the players are killed and the countdown restart. Theres the script into the textlabel:</p>
<pre class="brush: lua">local rep = game:GetService("ReplicatedStorage")
local minutes = rep:WaitForChild("Minutes")
local seconds = rep:WaitFo... | 132808 | ||||||||
1 | Script Shows GUI on the first Chest, but then doesnt show gui on any other chests, why? | 266723646 | AIetheo | 236 | 2019-07-29 19:46:38 | <p>My Problem is that when i spawn in, it spawns the chests, then I go up to the first one and it shows the gui. But when I walk Up To The Second Chest it does not show the gui for some reason but i can go back to the first chest and it will show the gui again.</p>
<p>First Chest:
<a target="_blank" href="https://gyazo... | 84669 | ||||||||
0 | Why is NumberValue Addition not working? | 231105564 | WhatsSamYT | 9 | 2021-02-26 02:40:42 | <p>I'm trying to add numbers to a NumberValue for my gameshow but it won't work. Can someone check my code?</p>
<pre class='brush: lua'>local Value = workspace.Blue.Sign.Value.Value
script.Parent.ClickDetector.MouseClick:Connect( function()
Value + 100
end)
</pre>
| 120695 | 1 | 109997 | 0 | 74087102 | Ziffixture | 6785 | 2021-02-26 02:52:10 | <p>You cannot make pointers to attributes in Lua. Your code is actually <em>storing</em> the <em>state</em> of <code>Value</code> at runtime, rather than making a reference to the property, "Value".</p>
<p>You also only performed an addition operation on <code>Value</code>, which would have evaluated to <code>n + 100</... |
0 | Adding a time gui? | 31686014 | V0ngola | 0 | 2014-05-08 23:53:05 | <p>So I'm creating game with modes.. This sample script is a mode "Boss Battle mode" so my problem is i want to add a script where the time will appear as a gui and not as message.
This > wait(10) --How long the game lasts/ and if all the boss is eliminated and the time gui is not yet over a msg will come " all boss el... | 4548 | ||||||||
0 | Which is this line of code working in a way, but not in the other? | 145701075 | preston1196 | 22 | 2019-12-22 17:50:29 | <p>So this specific line of code is making the value not go over 180 which is correct, but the adding function to get to 180 when it goes over 2 it changes to 180.
So basically it works as in not allowing the value to go over 180, but it doesn't let u do it by 1s which is the adding functions and the way its suppose to... | 91760 | 2 | 84940 | 0 | 78079406 | ScuffedAI | 441 | 2019-12-22 19:38:59 | <p>The first thing which is making me worried when looking at your script, is that you're trying to compare a strings with each other. Anything . I highly encourage you to convert the values into to numbers before doing a comparison.</p>
<pre class='brush: lua'>-- How to convert a string into a number
local number = to... |
0 | os.time or tick()? | 22097427 | ZeMeNbUiLdEr | 104 | 2015-11-06 02:41:04 | <p>So I'm making an upgrade system that continues the upgrade timer even when the player isn't online. (Example, think of Clash of Clans. When you start an upgrade, you can get offline and the upgrade timer will continue to countdown).</p>
<p>However, I'm new to both os.time and tick(). I've read many wikis and posts o... | 24128 | 1 | 27754 | 7 | 3508838 | DigitalVeer | 1473 | 2015-11-06 02:51:25 | <h2>os.time()</h2>
<p>os.time() <strong>always</strong> returns Unix time. If you are unsure what Unix time is, Unix time is defined as the number of seconds that have passed since 00:00:00 Coordinated Universal Time, Thursday, 1 January 1970.</p>
<p>Since <code>tick()</code> always returns what the users <em>local tim... |
2 | Multiple parameters in for pair loops? | 151702995 | RealTinCan | 217 | 2020-10-28 22:28:06 | <pre class="brush: lua">for _, gui in pairs(script.Parent.Abilities:GetChildren() and script.Parent.Passives:GetChildren())do
end)
</pre>
<p>As shown in the code above, when I use <strong>"and"</strong> it only loops through the 2nd argument, vice versa if I use <strong>"or"</strong> it only loops through the 1st argum... | 115029 | ||||||||
0 | Alligning character to the wall side ways using CFrame? | 429203148 | n_ubo | 29 | 2022-07-15 19:55:26 | <p>So I'm making a parkour game and before this issue, I've made the character successfully face the wall when it wants to scale the wall.</p>
<p>Anyway, that was for climbing, right now I'm making the second part allowing the player to wall-run which also works fine, the only thing I want to add is to make the charact... | 130805 | 1 | 118105 | 1 | 1071181471 | fcvrs | 22 | 2022-07-16 20:14:40 | <p>I think you might be overthinking this. Couldn't you just set .Orientation to the same as the wall? (You'd also need to make sure the front of the wall is orientated correctly)</p>
|
0 | How do you access functions in module scripts? | 98401192 | LifeInDevelopment | 364 | 2016-01-04 15:34:38 | <p>Okay so I wan't to use module scripts as I can keep my functions manageable. I have two questions,</p>
<p>First Question : Can I use multiple functions in a module script?
Second Question : How can I access Functions Inside Module Scripts?</p>
<p>I don't know if im supposed to use _M. before each function or if robl... | 26023 | 1 | 29625 | 2 | 1600676 | MasterDaniel | 320 | 2016-01-04 16:12:29 | <p>Interestingly someone just asked me this on a twitch stream. I have a funny feeling this isn't coincidence :p</p>
<p>There are two things you need for a module to work.</p>
<ul>
<li><p>A <strong>ModuleScript</strong> somewhere in the game</p></li>
<li><p>A script that <strong>Requires</strong> the module.</p></li>
<... |
0 | How do i make a forcefield block? | 147305218 | PeterParker17386 | 16 | 2022-10-09 16:31:53 | <p>I want to make a block where whenever your touching it, it gives you a forcefield but when you get off of the block it goes away, this is my code</p>
<pre class='brush: lua'>local forcePart = script.Parent
local canActivate = true
local function forceField(otherPart)
local humanoid = otherPart.Parent:FindFirstCh... | 131836 | ||||||||
0 | 'Unable to cast to Array?', I'm looping through everything in the game and preloading it. | 171340748 | maxpax2009 | 340 | 2020-05-13 10:15:04 | <p>I'm making a loading screen that loops through everything in the game and preloads it.</p>
<pre class='brush: lua'>for i, thing in pairs(game:GetDescendants()) do
game.ContentProvider:PreloadAsync(thing)
print("loading.." .. thing.Name)
end
print("Done")
</pre>
| 102940 | 1 | 95064 | 3 | 44083134 | Fifkee | 2017 | 2020-05-13 13:36:21 | <p>You don't need a generic loop in order to use PreloadAsync. You just need to give it a table, for example, <code>game:GetService('ContentProvider'):PreloadAsync(game:GetDescendants())</code>.</p>
<p>A cleaner example would be something like:</p>
<pre class='brush: lua'><br />game:GetService('ContentProvider'):Preloa... |
1 | How to learn the basics of scripting? | 14410847 | roku17 | 10 | 2014-04-17 13:37:22 | <p>What I am asking is the basics such as the meaning of a function, vector, algorithm, and other stuff dealing with scripting and guis (Scripts go into guis to work? ) . Thank you for help and for trying to help me.</p>
| 2428 | 2 | 3352 | 1 | 343558 | Sublimus | 992 | 2014-04-17 13:42:19 | <p>A good place to start is the roblox Lua wiki:</p>
<p>http://wiki.roblox.com/index.php?title=Lua_Help</p>
<p>If you can't understand something, look it up on here and see if it helps you understand it better. If you still can't understand anything, come back and ask again, and someone will help.</p>
|
1 | How to move camera to side of player? | 306251570 | A_thruZ | 29 | 2019-07-14 15:46:41 | <p>I am trying to make a Fortnite style game, and I want a third person view from the left side. I've tried this in a LocalScript:</p>
<pre class='brush: lua'>local cam = workspace.CurrentCamera
local player = game.Players.LocalPlayer
local character = player.Character
while cam.CameraSubject == nil do
wait(1)
end
... | 83682 | 2 | 77762 | 1 | 18156985 | koolkid8099 | 705 | 2019-07-14 16:08:24 | <p>Hello! I see that you are facing troubles using camera. Well that is no problem because I am here to help.</p>
<p>What you have here is pretty much right, you are just missing one vital thing. Whenever you want to manipulate the camera with your scripts, you must change the <a target="_blank" href="https://developer... |
0 | How to make a GUI Frame/it's descendants drag around? | 16510016 | SanityMan | 239 | 2014-07-10 13:59:16 | <p>So basically, I have the following setup:</p>
<pre class='brush: lua'>ScreenGui
ScrollingFrame
TextButton
TextLabel
TextLabel
</pre>
<p>I plan to create this in a script, but I don't know which values to set to make it draggable. I have looked through the list, and "Draggable" does seem l... | 7893 | 3 | 10253 | 0 | 5340836 | micke3212 | 35 | 2014-07-10 16:56:34 | <p>For the scrolling frame, turn the drag-gable and the active property to true. For the things inside of that scrolling frame, turn their drag-gable and active properties to false.</p>
|
0 | How to make a captain voting system? | 46714579 | NortonHDD | 14 | 2021-01-12 00:31:31 | <p>I'm not sure how to start the script. But I have a string value in replicated storage that will hold the player's name that is the captain. I'm gonna have 2 teams so I made BlueCap and RedCap the string value names. I want to have it so only the blue team can vote bluecap and vice versa.</p>
<p>I'm not asking for a ... | 118569 | ||||||||
1 | FireClient: player argument must be a Player object? | 849198397 | jdm4llfem8 | 94 | 2019-03-05 20:20:30 | <p>I never used FireClient Before, so this is my first attempt. For some reason it gives me the error FireClient: player argument must be a Player object, even tho the player argument is the player.</p>
<p>script:</p>
<pre class='brush: lua'>script.Parent.ClickDetector.MouseClick:Connect(function(player)
print(play... | 77252 | 1 | 72468 | 1 | 22302572 | 0_Halloween | 166 | 2019-03-05 20:26:52 | <p>The problem was that you putted the player at line 3 at game.Players:Getpltfromcharacter, the ClickDetector MouseClick function gives you the player, not its character</p>
<pre class='brush: lua'>script.Parent.ClickDetector.MouseClick:Connect(function(player)
print(player)
game.ReplicatedStorage.RemoteEvent:... |
2 | Twitter Code GUI Not Giving Leaderstats? | 371291236 | Rynappel | 212 | 2019-12-18 22:45:58 | <p>So I have this srippt, and you enter a code into a text box and your supposed to get leaderstats from it and it doesnt work and i dont know why please somebody help this is quite urgent thank merry xmas</p>
<pre class='brush: lua'>local box = script.Parent
local plr = game.Players.LocalPlayer
local redeemed = false
... | 91576 | 2 | 84909 | 4 | 566296650 | raid6n | 2309 | 2019-12-21 23:48:34 | <blockquote>
<p>why does this have 3 upvotes, i didnt even send an explanation wow</p>
</blockquote>
<pre class='brush: lua'><br />local box = script.Parent
local plr = game.Players.LocalPlayer
local redeemed = false
box.FocusLost:connect(function()
if box.Text == "Test" and redeemed == false then
local pla... |
0 | How do I have alternate animations for a hotkey? | 1241869417 | Lyphios | 77 | 2020-01-20 18:27:33 | <p>So currently I have some code that plays an animation when mousebutton1 is down, but I want it to have alternate animations. I want it to be randomized, so that each time I press the mouse button it plays a different animation. Here's my code</p>
<pre class='brush: lua'>local UserInputService = game:GetService("User... | 93311 | ||||||||
0 | Customizable House on Roblox? | 488024640 | Iamgoodwithtrends | 0 | 2018-01-12 20:56:03 | <p>I want to make a game where you can buy a house with in game cash and be able to decorate and customize it, kind of like the games Work At A Pizza Place and Meep City. I have searched all over the internet for days, I know how to make a buyable house (thanks to some youtube videos) but I cannot find any video or web... | 51990 | ||||||||
2 | How to add to a position when using instance.new? | 332695720 | nafey200 | 10 | 2021-04-07 04:45:48 | <p>I'm trying to make a function which when a player joins it creates a new part in a different position, I want them to separate by adding to the position. Here is the code I used:</p>
<p>`game.Players.PlayerAdded:Connect(function(newbuildingspot)</p>
<pre class="brush: lua">local NewBuildingSpot = Instance.new("Part"... | 122099 | ||||||||
1 | How to get the asset id of a face/image? | 285616474 | RedWirePlatinum | 53 | 2019-09-08 16:55:59 | <p>So I wanted to be able to make something where you can pick an image based off its id, but when it comes to faces or something, simply picking the id straight off the website doesn't work. Is there a way to be able to get the asset id of a certain face/image? I tried looking it up but it seems like it's impossible.
... | 87179 | 4 | 80757 | 0 | 9783001 | Sulfone | 141 | 2019-09-08 19:57:53 | <p>InsertService's <a target="_blank" href="https://developer.roblox.com/en-us/api-reference/function/InsertService/LoadAsset">LoadAsset</a> can be used to get a face's texture ID. Lets test it with the Freckles face's ID, and move the returned instance to workspace for viewing:</p>
<pre class='brush: lua'>game:GetServ... |
0 | How do you add debounce to an animation brick? | 574012679 | Lolbit_exe | 22 | 2020-11-09 23:06:49 | <p>So I'm making a game on roblox that is meant to play an animation when you touch a brick. It's about 8 seconds long, (idk if that helps) I've tried multiple things, but none work so far. Here is what I've made so far</p>
<p><code>function onTouched(hit)
function debounce(deb)
debounce(1)
local human = hit.Parent:fin... | 115566 | 2 | 106153 | 0 | 1858692567 | DevMaster333 | 200 | 2020-11-09 23:31:12 | <p>You start by storing whatever it is you need in variables. In this case, you need the part that gives the animation, the animation itself. If it's a local script, you can load the animation to the local player from the script itself.</p>
<p>Next, you create a touch connection with the part and check if the part that... |
0 | How to Make a Textbutton use a script if the user has a certain gamepass? | 463758281 | Guest_99866 | 7 | 2022-06-24 02:30:18 | <p>I was wondering how to make a textbutton use a certain script but only use the script if the user has a certain gamepass.</p>
| 130490 | ||||||||
0 | How do I fix " Players.Plexiious.Backpack.Combat:178: attempt to index function with 'Play'"? | 98750812 | Plexiious | 5 | 2021-01-12 23:02:24 | <p>I am trying to make a script inside my combat script that has it so when I press F it plays the animation and blocks but I keep getting this error</p>
<pre class='brush: lua'> Players.Plexiious.Backpack.Combat:178: attempt to index function with 'Play'
</pre>
<p>Can Yall Help?</p>
<pre class='brush: lua'>mouse.KeyDo... | 118611 | ||||||||
0 | I need some help with popup gui animations using tweens. Any help? | 87219894 | paintball000006 | 0 | 2021-10-24 21:51:21 | <p>I'm trying to make a popup gui with Tween animations, yet whenever I try inserting codes I think of, or codes that my friends give me, or even just searching it up, it doesn't work.</p>
<p>function PopupGui()
if script.Parent.Visible == true then script.Parent.Visible = false
else script.Parent.Visible = true
end
en... | 127970 | ||||||||
0 | Would an exploiter be able to abuse this? | 879399690 | jamespringles | 101 | 2021-01-13 00:01:18 | <p>So I have a damage script in ServerScriptServices. It's parameters are the player and it's damage.</p>
<p>The reason I have "none" as the first parameter is because I'm trying to damage another player not myself</p>
<pre class='brush: lua'>damageEvent.OnServerEvent:Connect(function(none,player,dmg)
--does damage stu... | 118614 | ||||||||
0 | Attempt to index nil with lookVector? | 201459593 | iiPizzaCraver | 71 | 2020-08-18 14:49:28 | <p>I am making a magic system in my RPG. The original script works very well on PC and I wanted to add mobile support. I got that bit sorted but on mobile I get the error in the title. I cannot find an alternative, I tried using UnitRay but that didn't work either. Any help is appreciated.</p>
<pre class="brush: lua">-... | 111620 | 3 | 102489 | 1 | 158811 | TGazza | 1336 | 2020-08-18 23:41:47 | <p>Edited with working code!</p>
<p>Local Script:</p>
<pre class="brush: lua">--// Services \\--
local ReplicatedStorage = game:GetService("ReplicatedStorage")
--// Variables \\--
local Remote = ReplicatedStorage.FireBallEvent
local PlayerScripts = script.Parent
local Player = PlayerScripts.Parent
local Mouse = Player:... |
0 | BodyForce Not Working Properly for Unanchored Part? | 1661478101 | Bob4koolest | 23 | 2020-11-22 20:27:30 | <p>I'm working on a gun that fires out bullets like any typical one. I've had to unanchor the bullets to allow them to trigger collisions, and since doing so will make them affected by gravity, I've attached a BodyForce them. However, what ends up happening is that the bullets end up going vertically rather than to the... | 116172 | ||||||||
0 | Is there a way to disable explosions from killing players but not other ncps? | 1048659559 | zandefear4 | 90 | 2019-06-15 20:15:10 | <p>I'm using grenades to kill npc's and I was wondering if there's a way to just make the explosions kill them and not me or other teammates? I found a script that just disables the explosions from breaking joints from anyone, including them but thats not what I need. Do the explosions just break joints, and that kills... | 81815 | 1 | 76114 | 1 | 151702995 | RealTinCan | 217 | 2019-06-15 21:53:57 | <p>If the grenades were a free model then it matters on what the scripting in it does. When a player's joints detach and the body falls apart the player usually dies but most likely the grenade lowers the player's health. The easiest way to do this is ( Go into "Model" ( In the top bar )> Click on "Spawn" > Go into spa... |
0 | please help? " 14:50:39.242 - 502: API Services rejected request with error. HTTP 403 (Forbidden)" | 98600858 | cjkizzy286 | 24 | 2020-05-27 13:55:08 | <p>please help me the code is</p>
<pre class='brush: lua'>game.Players.PlayerRemoving:Connect(function(player)
datastore:SetAsync(player.UserId, player.leaderstats.Milk.Value)
datastore:SetAsync(player.UserId, player.leaderstats.Coins.Value)
end)
</pre>
| 104514 | 1 | 96457 | 2 | 244452876 | JesseSong | 3371 | 2020-05-27 14:54:32 | <p>Basically, you have to go to<code>team create</code> and make sure your the owner, if you're not, then you cannot use datastores.</p>
<p>Make sure you publish the game.</p>
|
1 | Value.Changed:Connect(function() only works the first time, what did I do wrong? | 1085356580 | LeedleLeeRocket | 1179 | 2020-08-09 08:53:24 | <p>I just came across the FastCast module the other day and wanted to add onto the script so that the gun could have an ammo GUI and also have a reload system that can keep one bullet in the chamber. The gun starts off with 0 bullets in the magazine. When I reload it, it reloads but it doesn't subtract the 1 bullet tha... | 111038 | ||||||||
2 | How do I make an efficient UDim2 movement? | 33035751 | NecoBoss | 194 | 2014-05-10 18:23:47 | <p>Alright so I a making a menu with GUI's and I want to make this button more efficient so I can change it if needed without going through tons of work:</p>
<pre class='brush: lua'>function roll()
script.Parent.Parent.TextBox.Position = UDim2.new(-0.25,0,0.25,0)
wait(0.001)
script.Parent.Parent.TextBox.Position = UDi... | 4663 | 2 | 6287 | 4 | 644283 | AmericanStripes | 610 | 2014-05-10 18:24:26 | <p>Hello DarkNinja,</p>
<p>An easier way to move would be using the <a target="_blank" href="http://wiki.roblox.com/index.php?title=TweenPosition">TweenPosition </a> method.</p>
<p><strong>What is TweenPosition?</strong>
TweenPosition is a method in which a player can move a GUI, and make it look smooth. It makes all t... |
0 | Lua vs ROBLOX Lua? | 109490783 | TheScriptingAccount | 90 | 2016-03-13 16:07:18 | <p>Are they the same thing?</p>
| 28420 | 2 | 31913 | 1 | 386992 | BlueTaslem | 18071 | 2016-03-14 05:29:30 | <p>Right from Lua's "About" page:</p>
<blockquote>
<p>Lua is a powerful, fast, lightweight, embeddable scripting language.</p>
</blockquote>
<p>Lua is intended to be embedded and customized in another program. Lua does provide a standard REPL and interpreter, but this is essentially just embedding the Lua API in a very... |
0 | How do you make a FPS Gun and realistic Animation on it, When in Reloads,shoots,Sprints,ETC.? | 32199237 | Rohelper123 | 0 | 2014-04-15 08:00:46 | <p>Im making FPS Game that will has teams and capturable Flags and Changable Maps! Can you Guys Show me How to make that but if you Cants Thats ok I only need FPS Gun. Thank you.</p>
| 1561 | ||||||||
0 | This script broke can someone please help me? | 53831635 | UncleCharmIII | 0 | 2014-03-13 21:06:22 | <p>So it is a sleep tool it suppose to make you sleep but it doesn't make you fall anymore really does nothing. Can someone please fix it?</p>
<p>Script:</p>
<pre class='brush: lua'>gyro = Instance.new("BodyGyro")
gyro.maxTorque = Vector3.new(4e+004,0,0)
gyro.cframe = CFrame.fromAxisAngle(Vector3.new(0,0,1),math.pi/2)
... | 674 | ||||||||
1 | what are the differences of FindFirstChild() and WaitForChild()? | 702213653 | Grazer022 | 128 | 2020-08-08 04:42:10 | <p>I wanna know the differences since they’re almost similar to me. Thanks!</p>
| 110960 | 4 | 101887 | 0 | 791392321 | DuckyRobIox | 280 | 2020-08-08 06:24:46 | <p>Alright so basically the term <code>FindFirstChild()</code> is like when you want the script to find it right away like so if everything is fully loaded in and you used findfirstchild to a part in workspace it would find it but if you use <code>WaitForChild()</code> the script will wait for what your looking for inc... |
0 | Why does the pathfinding script causes the NPC to twitch? | 1961959172 | imnotaguest1121 | 313 | 2022-11-12 22:05:04 | <p>For some reason, the PathFinding Script causes the NPC to twitch, basically the npc can't decided to turn left or go staight causing the NPC to twich</p>
<p>Script:</p>
<pre class='brush: lua'>--Services--
local Players = game:GetService("Players");
local RunService = game:GetService("RunService");
local PathFinding... | 132256 | ||||||||
0 | How to trigger a function if the player count is too low? | 332695720 | nafey200 | 52 | 2021-04-15 06:42:46 | <p>It was underlined in red when I wrote this:</p>
<pre class='brush: lua'>if Players == <5 then
print ("not enough players!")
end
</pre>
<p>the '<' symbol is underlined in red? how do I fix this?</p>
| 122398 | 2 | 111518 | 0 | 1519437700 | Taikamunan | 15 | 2021-04-15 11:19:10 | <h1>Code</h1>
<p>Essentially you want to run an if statement checking if the player count is lower than 5.
You can do this by checking every time a player joins.</p>
<pre class='brush: lua'>local val = 5 -- player limit
function check()
if #game.Players:GetChildren() < val then -- # is essentially converting a v... |
0 | How do I make a hold down timer for capture points? | 169853903 | itsbboy | 10 | 2021-10-13 23:09:35 | <p>Hello, I've been working on a game and the main gameplay is to capture flag points but the problem is that you capture the point instantly without needing to wait. I was wondering how I can modify the script I have.</p>
<p>Thanks.</p>
<p>Other Info:</p>
<p>The script is a normal script inside model inside workspace<... | 127859 | 1 | 115879 | 0 | 1715522570 | BeautifulAuraLover | 275 | 2021-10-14 18:46:40 | <p>I do not really get what you mean by "capturing points" I understood it like that: You want transparency of Non and German 1 when its fully captured, We dont know what you want to do. I tried to help in a way I understood it, so I hope I understood it right:</p>
<pre class='brush: lua'>local team = game.Teams["US Ar... |
3 | How do I make chat commands? | 1850266 | Bubby4j | 231 | 2014-02-19 15:49:03 | <p>I want to add chat commands to my game, how do I script them?</p>
| 89 | ||||||||
0 | Why does the server not receive values if animation are loaded in this script? | 215833213 | Stiles8353 | 35 | 2022-10-01 03:12:49 | <p>In this script the chunk at the top is loaded animations. These are there to specify when to assign values based on animation. The values show up clearly for me in the properties tab, yet other ingame objects always see the value as 0.</p>
| 131768 | ||||||||
0 | How would I make this Streaming Enabled Compatible? | 86745980 | Sergiomontani10 | 236 | 2018-07-19 04:04:06 | <p>This is suppose to be a Intro for my game, but for some reason when ever I try to make it go to the camera, it never seems to do it. I do know that Streaming Enabled affects local scripts. This is Filtering Enabled and is a Local Script in my GUI that is in StarterGui.</p>
<pre class='brush: lua'>local Cam = game.Wo... | 63183 | ||||||||
1 | Function runs 1 more time, every time it's called. Any idea? | 823902285 | MarTieMak | 39 | 2021-06-06 00:44:53 | <p>Hello! This is my first question so point out anything I'm doing wrong.</p>
<p>I am attempting to make a game similar to Tower Defense Simulator. This is what I have for the tower placement script</p>
<p>LocalScript (in StarterGui)</p>
<pre class='brush: lua'>-- Highlight Script --
-- Variables
local player = game.P... | 124120 | 1 | 113147 | 1 | 46315546 | Retr0Thief | 104 | 2021-06-06 03:34:50 | <p>I see the issue inside your "place" function. When the player clicks, it calls the "place" function which is fine but each time the place function is called, it connects a function to the "InputBegan" event. This causes an unwanted memory leak because you never disconnected the connection when the "place" function h... |
0 | Disable Dialog on Selection? | 36450001 | Leb747 | 0 | 2014-07-10 19:55:07 | <p>I'm trying to create a NPC with a dialog that disappears for a while if you select an dialog choice.
Could I have to help on how to make a dialog be disabled for a temporary time (If Possible)?</p>
| 7908 | ||||||||
0 | How to sync ViewportFrame camera with main camera? | 325233223 | sssynk | 58 | 2019-06-28 17:42:38 | <p>Ok, so I am trying to make a Google Cardboard VR game with ViewportFrames. I am using another script to get the gyro input from the phone. But I have run into a problem. I want to sync the ViewportFrame camera with the main camera, so all rotations and movements are the same between the two cameras. Another problem ... | 82611 | ||||||||
1 | Grabbing all Children of a model and adding functions | 462428 | RSoMKC | 45 | 2014-02-18 20:33:58 | <p>How do I grab all the children from a model (Parts with different names) and make them for example the color red or transparent?</p>
| 71 | 3 | 140 | 3 | 19566737 | Unclear | 1776 | 2014-02-18 20:50:27 | <p>ROBLOX has a handy method named GetChildren that, when used on an object, will return all of the object's children. This is really useful for affecting all children of an object. For example...</p>
<pre class='brush: lua'>workspaceChildren = workspace:GetChildren()
</pre>
<p>... will return a table full of the child... |
0 | Problem with custom character movement with raycast normal? | 384201321 | Dexiber | 272 | 2022-07-29 15:29:13 | <p>So basically, I'm trying to make a smooth slope moving system like Speed Run 4: https://web.roblox.com/games/183364845/Speed-Run-4</p>
<p>I tried it myself, but there's an issue.</p>
<p>The Code:</p>
<pre class='brush: lua'>wait()
local plr = game.Players.LocalPlayer
local char = plr.Character
local human = char.Hum... | 130995 | ||||||||
0 | I can't identify this error on the end of the function?(ANSWERED) | 835155757 | BRO_ITmeYO | 106 | 2020-07-12 13:08:59 | <p>I'll put my full script for context, but the place it gives me an error is on the block about the on button. (line 58) Here is my error:</p>
<p>08:59:35.582 - ServerScriptService.MicrowaveScript:58: Expected identifier when parsing expression, got ')'</p>
<pre class='brush: lua'>local onButton = game.Workspace.Micro... | 108857 | ||||||||
0 | Making Text Label Invisible Not Working? | 331809274 | TechModel | 88 | 2020-11-12 08:21:30 | <p>I try to remove a text label specifically only for me but no anyone else.</p>
<pre class='brush: lua'>game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
local GuiClone = script.OverheadGui:Clone()
GuiClone.Parent = Character.Head
local Uppe... | 115663 | 1 | 106218 | 1 | 173901967 | WoTrox | 315 | 2020-11-12 10:24:16 | <pre class='brush: lua'>game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
if Player.Name == "TechModel" then
local GuiClone = script.OverheadGui:Clone()
GuiClone.Parent = Character.Head
end
end)
end)
</pre>
<p>This code on... |
0 | How do I prevent scripts from breaking when the player dies? | 101146721 | DemGame | 106 | 2020-08-02 00:57:50 | <p>I have a local script inside of StarterCharacterScripts, and it only works if the player doesn't die. Any suggestions?</p>
<p>Here is my code:</p>
<pre class='brush: lua'>--do variables
local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character or Player.CharacterAdded:wait()
repeat wai... | 110512 | 1 | 101515 | 1 | 60076245 | kaytikookie | 45 | 2020-08-02 06:32:52 | <p>try placing the script in the StarterPlayerScripts object (StarterPlayer.StarterPlayerScripts)
considering that you get the Character via the Player, this should work fine.</p>
|
0 | How would I go about creating a global Gui? | 49316000 | IntellectualBeing | 430 | 2014-05-08 18:05:11 | <p>When something changes for one person, it changes for everyone. Say I input something in a textbox and press a textbutton, that textbutton would send the data to other players and change there</p>
<p>Here is a small little example, I know it's buggy but it's basically what I am trying to do?</p>
<pre class='brush: l... | 4526 | 1 | 6125 | 0 | 51935319 | devDave | 50 | 2014-05-08 19:04:55 | <p><code>_G.variableName</code> for a variable but I doont know for a global function, check here <a href="http://wiki.roblox.com/index.php?title=Global_function">http://wiki.roblox.com/index.php?title=Global_function</a></p>
|
0 | How do I script a remote developer console? | 190357083 | THUNDER_WOW | 149 | 2020-07-11 01:36:52 | <p>I basically want it so I enter commands in a chat service and it happens to the output. How do I do this? What is it that I script?</p>
| 108745 | ||||||||
0 | Keydown function wont work inside normal script? | 22534159 | Metraria | 17 | 2020-05-01 10:04:31 | <p>i need it to be in a normal script for this to work but they keydown function only seems to work in a local script</p>
<p>does anyone know why it only works in a local script?</p>
<pre class='brush: lua'>--//Keystroke class
local debounce = true
script.Parent.Equipped:Connect(function()
local tool = script.Paren... | 101441 | ||||||||
0 | How do you kick LocalPlayer.name (yourself)? | 246300668 | iiDkOffical | 109 | 2019-07-31 20:55:48 | <p>Scripting helpers removed the last post.</p>
| 84832 | ||||||||
0 | Hello how do you make a tool be able to go to a part when hovered over? | 851483151 | skinny_Nikki123 | 2 | 2021-02-23 15:03:06 | <p>like if you want the player to have a puzzle piece and when they walk to the talk it auto puts it there in that one spot? do you need a script? is there something else that can help me?</p>
| 120563 | ||||||||
0 | attempt to index upvalue? | 2074381 | CrispyBrix | 113 | 2016-08-31 15:18:29 | <p>So simple shop GUI and this is the purchase button. Here is what it says when I try to click purchase:
<code>Players.Player1.PlayerGui.Shop.infBack.Buy.LocalScript:8: attempt to index upvalue 'wep' (a nil value)</code></p>
<p>So yeah and here is the code:</p>
<pre class='brush: lua'>local but = script.Parent
local g... | 35183 | ||||||||
1 | parts from a group not fading in? | 419000434 | Omq_ItzJasmin | 661 | 2021-10-02 00:00:41 | <p>i feel like its really obvious. sorry</p>
<pre class='brush: lua'>-- ignore this part, not the problem
local green = Color3.fromRGB(55, 175, 97)
local ts = game:GetService("TweenService")
local tweenOg = ts:Create(script.Parent,TweenInfo.new(1),{Color = green})
local debounce = false
local flowers = script.Parent.Pa... | 127773 | 1 | 115838 | 1 | 388314586 | efficacies | 150 | 2021-10-02 02:10:19 | <p>You forgot to make the increment value [0.1] a negative. It wouldn't make sense to increment by 0.1 to get an end value of 0. A positive increment value will count up and a negative increment value will count down. You can read more here: <a target="_blank" href="https://developer.roblox.com/en-us/articles/Loops">Lo... |
0 | How do I get the players accessories to be where they should? | 48153931 | purplxboi | 2 | 2021-06-10 11:09:47 | <p>Hello. I've made a script that clones the player's character and positions the limbs etc. where I want them to be. The problem is that the player's accessories do not stay on the character because they only get moved to the Origin Position since the script is moving everything (the whole model) to there. I can not t... | 124245 | ||||||||
0 | How to change cursor icon when using GUI? | 303575359 | NoahsRebels | 100 | 2020-07-04 19:29:03 | <p>I've implemented a custom cursor icon into my game, but whenever you hover over GUI objects, it displays the default mouse. I tried to make a script that resets the custom icon if you hover over a GUI object, but that doesn't seem to work either. I also can't seem to find any alternative method to set the mouse icon... | 108199 | 1 | 99450 | 1 | 300989791 | Omzure | 82 | 2020-07-04 21:20:30 | <p>the solution to this may answer your problem</p>
<p>https://devforum.roblox.com/t/mouse-cursor-override/402376</p>
|
0 | How do I make my proximity prompt compatible with mobile? | 1331661786 | Cowgato | 33 | 2022-09-10 21:13:03 | <pre class='brush: lua'>local PlayerManager = require(script.Parent.Parent.PlayerManager)
local Button = {}
Button.__index = Button
function Button.new(tycoon, part)
local self = setmetatable({}, Button)
self.Tycoon = tycoon
self.Instance = part
return self
end
function Button:Init()
self.Prompt = s... | 131578 | ||||||||
1 | How do I anchor the player to the part to prevent clipping? | 104269101 | kingsworld9 | 14 | 2022-05-21 05:43:56 | <p>Hello all,</p>
<p>I’m trying to create an elevator for my game, but I’m not sure how to prevent players from clipping through the floor when the TweenService animation plays. (To clarify, I used the TweenService animator plugin.)</p>
<p>I would like to know if there is a way to anchor the player to the part (it is n... | 130061 | ||||||||
1 | Image won't show if leaderstats is this high? | 238838551 | PadmeOragana | 41 | 2020-03-03 05:15:20 | <p>So, I want to make a collecting game and the catalog shows the collectibles you have. I made all of the collectibles leaderstats so you can save it. So, I made the image in the gui have a value and a script. Here it is:</p>
<pre class='brush: lua'>local ting = 0
mlvl = script.Parent.Lvl.Value
if ting == 0 then
... | 95498 | ||||||||
0 | Clone Spawning for everybody in the game? | 979283405 | Lagfss | 36 | 2022-09-12 19:11:25 | <p>So I wrote a boat shop script where if you have enough money and dont already own it you can buy and spawn the ship or spawn it if you already own it. The one problem is when one person tries to spawn their boat instead of their only being one multiple spawn depending on how many are in the server. Example if there ... | 131608 | ||||||||
0 | Prompt to buy a gamepass? | 2074381 | CrispyBrix | 113 | 2018-11-01 07:05:28 | <p>I have looked all over and nowhere have I found a solution, I even tried just copy and pasting from the new wiki site and altering the gamepass ID. I tried changing the ID ot the full link. I have no idea where to go from here. Reading the new way to handle gamepasses on the devforum does not address this anywhere t... | 69825 | ||||||||
1 | Question regarding billboard gui's ? | 2600997 | crackabottle123 | 110 | 2014-07-26 10:22:22 | <p>I am trying to add billboard gui's to player's heads.
I copied the script out of another game I had and for some reason it no longer works, in the original game and in play solo the scripts work fine (they are both in server scripts)
I added prints all through and they all print, the player/character are both define... | 8717 | ||||||||
1 | Team change script for my game isnt working? | 547812463 | Stoutscientist | 32 | 2021-06-08 16:25:16 | <p>So my friend and I are making a game where we throw cookies at each other and I needed to make a team change script so I followed a tutorial and it kind of works when I click red or blue it just sets my team to neutral. Thanks!</p>
<p>Script in server script service:</p>
<pre class='brush: lua'><br />game.Replicated... | 124197 | 1 | 113219 | 1 | 112532095 | Vong25 | 187 | 2021-06-08 17:12:59 | <p>The second word of the BrickColor names should not have a capital letter.</p>
<p>Please reference this <a target="_blank" href="https://developer.roblox.com/en-us/articles/BrickColor-Codes">article</a> on how BrickColor names are capitalized.</p>
|
0 | How to make a person click something to get an item? | 29747257 | aoaoaoaoa00 | 4 | 2017-12-24 20:22:16 | <p>I actually need a bit of help with this cause I forgot the code or how it goes because I need them to know the player is the guy that clicked it and I need it to ONLY appear in the players hands. Please don't give me code but instead show me how it would be possible so I'd know in the future.</p>
<p>Thanks!</p>
| 50867 | ||||||||
0 | How to call module script from the server instead of client? | 364796628 | Funnyskyswagway3 | 30 | 2022-09-10 19:37:04 | <p>I’ve been diving into module scripts and I know that its depended on the script that requires it whether its going to be on the server or client but I would like it to be on the server. However, you cannot use **UserInputService **on a server script so everything that happens will be on the client and I can’t figure... | 131577 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.