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 | Can someone explain os.time() to me? I'm so confuesed! | 226832508 | MattVSNNL | 116 | 2021-04-07 14:24:57 | <p>I've been seeing a Roblox game making a text that shows the real-time and week, And I dug a bit and figured out it's called os.time(), I looked on youtube a bit and found no videos that teach you how it works, So the only logical thing I figured to do was ask someone, So can anyone tell me how it works and maybe put... | 122117 | ||||||||
0 | My particles when you land are spawning really high for some reason? | 54652546 | robot7866 | 36 | 2021-10-11 20:32:56 | <pre class='brush: lua'>game.ReplicatedStorage.PizzaPower2Remote.OnServerEvent:Connect(function(player)
local workplayer = game.Workspace:FindFirstChild(player.Name)
local plrRp = workplayer:FindFirstChild("HumanoidRootPart")
local jump = Instance.new("BodyPosition")
local tw = game:GetService("TweenSer... | 127843 | ||||||||
0 | Pls help ShopGui Enabling Script doesnt Work. Its Touch Based.? | 506839197 | Omerevkizel | 16 | 2020-06-29 14:37:52 | <pre class='brush: lua'>local detector = script.Parent
function opengui()
local shopgui = game.Players.LocalPlayer.PlayerGui.ShopGui
shopgui.Enabled = true
end
detector.Touched:Connect(opengui)
</pre>
<p>pls help this error is too important 4 me :))</p>
| 107740 | 1 | 99040 | 0 | 245864252 | xInfinityBear | 1026 | 2020-06-29 14:48:32 | <p>I'm assuming this is a local script, correct? If so, local scripts do not work inside workspace. Local Scripts will only run if it is a descendant of one of the following objects: <strong>A player's Backpack, Character Model, PlayerGui, PlayerScripts</strong> and also <strong>ReplicatedFirst</strong></p>
<p>This can... |
0 | Tycoon Dropper's Money Gives Extra Money?! | 71530978 | enes223 | 312 | 2018-02-07 17:14:58 | <p>I Maked Tycoon And Placed Conveyor But When Part Deletes It Gives Extra Money!
Here's Script:</p>
<p>script.Parent.IDK.Touched:connect(function(hit)
if hit.Name == "Money" then
local plr = game.Players.LocalPlayer
plr.leaderstats.Money.Value = plr.leaderstats.Money.Value + script.Parent.WOW.Value
hit:Destroy()
end
e... | 53323 | 1 | 52592 | 0 | 841509 | WillieTehWierdo200 | 966 | 2018-02-07 17:31:32 | <p>You are just missing a debounce. Sometimes the <code>Touched</code> event can fire multiple times for a single part.</p>
<pre class='brush: lua'>local debounced
script.Parent.IDK.Touched:connect(function(hit)
if not debounced and hit.Name == "Money" then
debounced = true
local plr = game.Players.... |
0 | Why should I use :WaitForChild instead of .AmountOfOrbs? | 1331661786 | Cowgato | 33 | 2022-09-10 01:13:42 | <p>What I am trying to say, is why should I use workspace:WaitForChild("AmountOfOrbs") instead of game.workspace.AmountOfOrbs?</p>
<pre class='brush: lua'>--AmounOfOrbs is a numbervalue in workspace btw--
if workspace:WaitForChild("AmountOfOrbs").Value >= 3 then
workspace.Door.CanCollide = false
... | 131566 | ||||||||
0 | How can I check if a player has already clicked a button before? | 70235059 | BennyBoiOriginal | 293 | 2016-06-13 11:26:09 | <p>Is it possible to check if a player has already clicked a button? Like if a player has already went through the Surface GUI and got something and then when they click it again they wouldn't be able to.</p>
| 31755 | ||||||||
0 | Script is pausing loops instead of ending them? | 536049572 | NiroTurtle | 83 | 2020-01-18 10:15:46 | <p>So I have a round based game and if all the players in a team die then it will break the for loop and continue. That's what I want it to do. What it's actually doing is pausing the timer for about 5 seconds and continue. Please help..!</p>
<pre class='brush: lua'>-- the parts that really matter
for c... | 93179 | ||||||||
0 | Local in front of functions? | 57249717 | iluvmaths1123 | 198 | 2014-07-21 08:01:28 | <p>Explanation of why there is sometimes local in front of functions?</p>
| 8446 | 3 | 10966 | 3 | 26319273 | 2eggnog | 981 | 2014-07-21 08:28:23 | <p>In Lua, it turns out that local functions and variables can be accessed faster than global variables/functions. Normally this doesn't matter, but if a function needs to be called extremely often, the performance increase adds up.</p>
|
0 | Why is UserInputService.InputBegan:Connect(function(input) not working how i want it to? | 275257157 | marsdonh | 36 | 2020-10-26 19:19:53 | <p>there are two of the bellow scripts one for each label. but for some reason the image for the drag label dosent change? why? and also why can i click and drag outside the label?</p>
<pre class='brush: lua'>local UserInputService = game:GetService("UserInputService")
local player = game.Players.LocalPlayer
local info... | 114934 | ||||||||
1 | "xScale is not a valid member of UDim2"? | 76734233 | generalYURASKO | 99 | 2021-01-04 22:38:13 | <p>So I'm trying to move a GUI using tweening, and I've got most of it together, but for some reason, I keep getting this error "xScale is not a valid member of UDim2."
This is the exact code I'm using</p>
<pre class='brush: lua'>local FuelLeftProperties = {
size = UDim2.new(CurrentFuelGUI.Size.xScale,CurrentFu... | 118187 | ||||||||
0 | I tried to make the dead body ragdoll stick with a moving road is runservice dead, help? | 147178737 | Daddy_Francisco | 2 | 2023-03-14 12:44:23 | <p>look i'm trying to make an obby but when player fell out of the car the dead body won't move</p>
<p>idk how to fix it can someone help me, thank you.</p>
<pre class='brush: lua'>local TweenService = game:GetService("TweenService")
local part = script.Parent
local model = script.Parent.Parent
local cframelocation = s... | 133187 | ||||||||
0 | How to get only the Numbers in a String? | 73292081 | FullMetalEdward45221 | 106 | 2019-03-04 16:59:11 | <p>so i have this String Variable:</p>
<pre class='brush: lua'>local string = 'Example String 256721'
</pre>
<p>i want to get only the numbers in the string (<em>256721</em>)<br />
does roblox have a function for this?</p>
| 77210 | 1 | 72434 | 1 | 110677473 | starmaq | 1285 | 2019-03-04 18:56:15 | <p>For this you gotta use the string.match function, string manipulation is a really interesting thing so <a target="_blank" href="https://developer.roblox.com/articles/Lua-Libraries/string">check it out</a>.</p>
<p>string.match will return a string that contains what relates between 2 strings. For example</p>
<pre cla... |
0 | Server Send Values to client with RemoteEvent or other way? | 552450977 | ksony | 54 | 2018-12-28 20:08:56 | <p>I have an intvalue saved in serverStorage, how can I do it so that it is constantly sending its value to a local intalue with remote events, if it is not possible with remote events, what other form is there?
I can not save it in replicated storage</p>
| 73195 | ||||||||
1 | ? Transparency is not a valid member of BoolValue "Workspace.Construction ? | 1491184861 | 666_brithday | 103 | 2023-02-23 16:32:35 | <p>I want all my lights to turn on and off if Switch = true
Error I get
Transparency is not a valid member of BoolValue "Workspace.Construction lights.Light Arrow.Switch"</p>
<pre class='brush: lua'>game.ReplicatedStorage["Light Settings"]["Left Lights"].OnServerEvent:Connect(function()
local Switch = script.Parent... | 133110 | 1 | 120202 | 1 | 1357830938 | DindinYT37 | 246 | 2023-02-24 10:21:00 | <p>As we don't know about the structure of your workspace, it's somewhat hard to identify the exact issue. Though, I have some ideas:</p>
<ul>
<li>You use the same <code>ConLights</code> variable-name for both <code>script.Parent["Light Arrow"]</code> and its Child-instances.</li>
<li>It could be that one of the childr... |
1 | Attempt to index nil with 'leaderstats' Even though they exist? | 1483026272 | wswswff | 39 | 2023-02-15 02:08:53 | <p>So i'm making a machine that converts your resource to money at a tick rate of every second. The issue is that when the tick rate is 4 per second, and your starting amount is 30, you get -2. Now, to combat this, I made this script:</p>
<pre class="brush: lua">local plr = script.Parent.Parent.Parent.Parent
if plr and... | 133073 | ||||||||
0 | Restricting particle emitters for parts that are not yet generated? | 941888425 | TonyFish6379 | 0 | 2020-08-02 08:35:08 | <p>I would like to restrict particle emitters from showing on parts that are not yet generated in my game. (ie; parts that have not yet been introduced to gameplay yet) I am working on a Tycoon style of game.</p>
<p>As of now, I have random emitters showing up all over my map. I understand the concept behind ParticleEm... | 110532 | ||||||||
0 | How do you teleport(All) players? | 13667373 | LordDragonZord | 3361 | 2014-05-02 01:32:34 | <p>I don't know how... Do you have to use BodyPosition? Or Cframe? I'm confused... I'm using</p>
<pre class='brush: lua'>local player = game.Players:GetPlayers()
for i = 1, #player do
player[i].Character:MoveTo(Vector3.new(0,2,0))
</pre>
<p>Is it right? I know it's right but Why is it only teleporting one person? Not a... | 4107 | ||||||||
1 | Why isn't a point being added to the leader board? | 1752724383 | Xyternal | 145 | 2021-06-10 16:26:09 | <p>So as i had previously asked, my code won't give me one kill per kill. I get more then one kill. So I added a debouce system. Now, instead of getting any points, i get none. Why does that happen? Here is my script.</p>
<pre class='brush: lua'>ball = script.Parent
damage = 50
local debounce = true
function onTouched(... | 124249 | ||||||||
0 | LogService not working with FilteringEnabled? | 51237105 | PyccknnXakep | 1225 | 2017-07-18 04:00:54 | <p>So I have this <code>LocalScript</code>in a Gui:</p>
<pre class='brush: lua'>local player = game.Players.LocalPlayer
local ls = game:GetService'LogService'
local colors = {[0] = Color3.new(1, 1, 1), Color3.new(0, 0, 1), Color3.new(1, 1, 0), Color3.new(1, 0, 0)}
local num = 0
ls.MessageOut:connect(function(msg, type)... | 45429 | 1 | 46307 | 0 | 78598789 | Skeletonarcher12 | 17 | 2017-07-18 06:01:21 | <p><strong>Log Service</strong>
Log service will work with Filtering Enabled, however it will only display output from the players <code>Local Scripts</code>.</p>
<p><strong>TweenPosition</strong>
This should work fine in Filtering Enabled as long as you use a <code>local script</code></p>
|
1 | How to disable the Backpack based on Team? | 561395661 | Rancidladyfingers2 | 7 | 2023-01-14 18:46:18 | <pre class='brush: lua'><br /></pre>
<p>Info; When the player is in the lobby they are transferred to the "Lobby" Team, when they are in the map they are transferred to the "Playing" Team. I would like for my script to disable the players backpack when they are in the Lobby, otherwise they can pull out their weapons an... | 132836 | 2 | 119977 | 1 | 1357830938 | DindinYT37 | 212 | 2023-01-14 22:26:46 | <p>I think the problem here is that you're only checking the team of the player once when the player is joining. I recommend using <code>GetPropertyChangedSignal("Team")</code>, for example:</p>
<pre class='brush: lua'>local Teams = game:GetService("Teams")
local Backpack = Enum.CoreGuiType.Backpack -- Usually I wouldn... |
0 | Walk speed and jump power change doesn't apply on respawn? | 502210849 | krLuCiEzkr | 22 | 2023-02-03 14:59:41 | <p>Hi, I am working on an obby game.</p>
<p>The game settings:
Jump: 0
Walk: 0</p>
<p>Basically, you cannot move or jump.</p>
<pre class='brush: lua'>local sounds = game.Workspace.Sounds
local player = script.Parent.Parent.Parent.Parent
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.ne... | 133007 | 3 | 120124 | 1 | 502210849 | krLuCiEzkr | 22 | 2023-02-04 03:06:46 | <p>Closed since I got help from another person, still appreciated.</p>
<p>Here is the script:</p>
<pre class='brush: lua'>local TweenService = game:GetService("TweenService")
local sounds = game.Workspace.Sounds
local player = game.Players.LocalPlayer
local tweenInfo = TweenInfo.new(0.2,Enum.EasingStyle.Linear)
local S... |
0 | how to make a checkpoint saving system? | 1233134411 | ieatbaconflakesdaily | 10 | 2021-02-07 00:49:30 | <p>im fairly new to scripting, ive tried to make my own script for saving checkpoints, but it doesnt work.</p>
<p>Script:</p>
<p>leaderstats = player.leaderstats
Stage = leaderstats.Stage
CheckpointNumber = game.Workspace.Checkpoints:FindFirstChild(Stage.Value, game.Workspace.Checkpoints)</p>
<p>local spawn.Position = ... | 119748 | ||||||||
0 | How come my math.random script only does the first if statement? | 158844273 | ThatOneKid7590 | 45 | 2016-10-08 19:55:14 | <pre class="brush: lua">function onTouched()
local partchoice = math.random(1,3)
if partchoice == 1 then
game.Workspace.Part1:Destroy()
script.Parent:Destroy()
end
if partchoice == 2 then
game.Workspace.Part2:Destroy()
script.Parent:Destroy()
end
if partchoice == ... | 36160 | ||||||||
0 | How would i go about creating a cooldown for invisibility power? | 364796628 | Funnyskyswagway3 | 24 | 2021-05-02 02:47:19 | <p>I just need help because whenever I try creating a cooldown, you can still spam the invisibility power.</p>
<pre class='brush: lua'>game.Players.LocalPlayer:GetMouse().KeyDown:Connect(function(key)
if key == "e" then
local TS = game:GetService("TweenService")
local Info = TweenInfo.new(2, Enum.Ea... | 123014 | ||||||||
0 | the function should only runs if user has right mouse button held down on a button.How do i do it? | 357035682 | mikey2019d | 38 | 2020-07-21 08:11:39 | <pre class='brush: lua'>local UIS = game:GetService("UserInputService")
local runService = game:GetService("RunService")
--local
local player = game.Players.LocalPlayer
local slider = script.Parent
local sliderbar = script.Parent.Parent
local Bckcolor = script.Parent.Parent.Color
local held = false
UIS.InputBegan:Conne... | 109595 | ||||||||
0 | how do i make the player jump backwards when touching an object? | 1294246528 | wackypug09 | 2 | 2022-08-05 10:55:21 | <p>i am try to make make it so when a player is touching a certain object, the player jumps backwards but the script I made is only making the player jump.</p>
<pre class='brush: lua'>damagePlane = script.Parent
function damage(hit)
local partParent = hit.Parent
local humanoid = partParent:FindFirstChild("Human... | 131107 | ||||||||
0 | Do Gampasses Work for all Places in a Universe? [Solved] | 307412 | deaththerapy | 60 | 2014-04-30 23:52:00 | <p>I'm wanting to implement a health regen option for players to buy and am wondering if I should make it a Gamepass or Dev Product. Either way, it'll be a one time purchase, but I'm not sure if a Gamepass purchased in the lobby Place would work for the other Places in the Game Universe.</p>
| 4026 | 3 | 5534 | 1 | 16581981 | sgsharp | 265 | 2014-04-30 23:56:45 | <p>Yes, make sure you use the ID of the gamepass and use the PlayerHasPass API.</p>
<p><a target="_blank" href="http://http://wiki.roblox.com/index.php?title=How_to_Use_Game_Passes">http://wiki.roblox.com/index.php?title=How_to_Use_Game_Passes</a></p>
|
0 | How do I make a player re spawn using Player.Respawn? | 851243817 | Zikelah | 20 | 2019-06-19 14:07:54 | <p>I want to make a Button GUI that makes the player respawn</p>
<pre class="brush: lua">--What Ive Tried:
Player.Respawn = true
</pre>
<p>Can Someone help me with this?</p>
| 82072 | 2 | 76316 | 0 | 39939779 | EpicMetatableMoment | 1444 | 2019-06-19 14:45:32 | <h3>Question</h3>
<blockquote>
<p>How do I make a player re spawn using <code>Player.Respawn</code>?</p>
</blockquote>
<h3>Whats Wrong</h3>
<p><code>Player.Respawn</code> isn't a member of <code>Player</code>'s at all.</p>
<h3>Solution</h3>
<p>If you want to make the character instantly respawn you can use the <code>:L... |
0 | How do I make a ColorCorrection's Tintcolor tween during a certain time of day? | 27975160 | FrigidusIncendium | 16 | 2021-05-02 23:30:40 | <p>Hey there! I have a bit of a wonky script that is supposed to make the color correction to purple during the nighttime, and regular during daytime. It works for nighttime perfectly, but does not wait until daytime to do the second tween of changing from purple, back to default. Is there anything I should change to a... | 123046 | 1 | 112112 | 0 | 86083702 | jediplocoon | 862 | 2021-05-03 00:07:14 | <p>I moved the problem if statement outside of the other if statement, and changed it to an elseif. I am unable to check if this works because I'm on mobile, so I hope it works, because I couldn't find anything else wrong with the code.</p>
<pre class='brush: lua'>local CC= game.Lighting.ColorCorrection
local TweenServ... |
0 | How would I go around scripting it so I can see my torso, arms, and legs whilst in first person? | 1605120315 | Nuzixa | 4 | 2020-08-02 11:34:05 | <p>Hi, I was wondering how to script it so I can see my whole body whilst in first person. Please help! Thanks.</p>
| 110535 | 1 | 101532 | 1 | 1306197601 | radiant_Light203 | 390 | 2020-08-02 12:42:45 | <p>You don't deserve this for writing such a low-effort question, without even giving what you've tried or what you know. But I am bored and so, here:</p>
<pre class='brush: lua'>game:GetService("RunService").RenderStepped:Connect(function()
repeat wait() until game:GetService("Players").LocalPlayer.Character
f... |
0 | Hi guys, im not good at scripting, still learning, I was wondering if this script contains a virus? | 521176403 | zqqru | 1 | 2022-06-23 00:25:22 | <p>local MPS = game:GetService("MarketplaceService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")</p>
<p>local Products = {
[0] = function(receipt,player)
ReplicatedStorage.GrappleHook:Clone().Parent = player.Backpack
ReplicatedStorage.GrappleHook:Clone().Parent = player.StarterGear
end;
}</p>
<p>func... | 130472 | ||||||||
0 | Loop Not Running on Second Attempt. What's Wrong? | 1557199043 | EdiCat1234 | 0 | 2022-10-31 08:55:13 | <p>I'm trying to make a tower defense game, and I'm trying create a character placing system. When I run it once, it works fine, but on the second time, it doesn't run at all and just stops around line <code>17</code>.</p>
<p><strong>What am I doing wrong?</strong></p>
<pre class='brush: lua'>local players = game:GetSe... | 132096 | ||||||||
0 | Error 'invalid argument #1 to 'len' (string expected, got nil)', any help? [SOLVED] | 215237638 | LikeableEmmec | 26 | 2021-06-08 17:29:58 | <p>Hello, and thank you for reading!
This is our client:</p>
<p><em>Client:</em></p>
<pre class='brush: lua'>local player = game.Players.LocalPlayer
local CreateDialogEvent = game.ReplicatedStorage.CreateDialogEvent
local DialogFrame = player.PlayerGui.DialogGUI:WaitForChild("DialogFrame")
local DialogGUI = DialogFrame... | 124202 | ||||||||
0 | Humanoid is not a valid member of model? | 1292809675 | AronIZOdd | 6 | 2020-09-11 22:23:20 | <p>Hey I am currently making a first person script and I am having a problem, the problem is is that it says "18:18:31.139 - Humanoid is not a valid member of Model", I honestly dont know what is happening. Please help.</p>
<pre class='brush: lua'>local player = game.Players.LocalPlayer
local char = player.Character
lo... | 113041 | ||||||||
0 | How do I preform a certain action a certain amount of times in 1 second evenly split out? | 947940438 | beybladerstew1 | 2 | 2021-07-21 21:45:13 | <p>Let's say I want to preform an action 15 times in a second. I want to make sure the action was preformed exactly 15 times in exactly 1 second. How do I do that?</p>
<p>I've tried this:</p>
<pre class='brush: lua'>local oldTime = os.time();
local amount = 15;
local iteration = 1;
while os.time() == oldTime do
wai... | 125574 | 2 | 114266 | 0 | 680620891 | CosmicIsGod | 139 | 2021-07-21 22:11:50 | <p>This can be achieved with a for loop.</p>
<p>A for loop runs code a certain amount of times, and to wait in-between you just use wait().</p>
<pre class='brush: lua'>local amount = 15;
local iteration = 0;
for count = 1,amount do
wait(1 / amount);
iteration += 1;
end;
print(iteration)
</pre>
<p>In this exampl... |
1 | How Can I Add A Respawn Keyboard Shortcut? | 1592282492 | Next_Memer | 21 | 2020-05-02 15:37:57 | <p>So... I Want To Make It So The Player Can Reset His Character While In-Game (Not The Menu). The Keyboard Shortcut Should Be 'R'. Please Write Me A Code <3</p>
| 101604 | 4 | 93860 | 0 | 251936426 | youtubemasterWOW | 2717 | 2020-05-02 15:55:06 | <p>You'd need to use <code>UserInputService</code>. First, insert a LocalScript into <code>StarterPlayer > StarterCharacterScripts</code>. Next, insert a <code>RemoteEvent</code> into <code>ReplicatedStorage</code> and rename it to "ResetCharacterEvent". Write the following code.</p>
<pre class='brush: lua'>game:Get... |
1 | (Noob here)(Simple Script) Need help with a Vector3 Function? | 1405945887 | DVSRobert | 7 | 2020-09-16 01:05:07 | <p>Hey guys my name is DVSRobert and I was wondering what was wrong with my script. Im trying to make a script where when a Part is touched it moves to a Diffrent position the code is saying that I need to close my function at line 5 even though Ive already ended it at line 5. What Did i do wrong?</p>
<pre class='brush... | 113212 | 2 | 103938 | 1 | 44083134 | Fifkee | 2016 | 2020-09-16 02:44:07 | <p><code>script.Parent.Touched:Connect(DoDOMove()</code> should be <code>script.Parent.Touched:Connect(DoDOMove)</code>. The Connect function takes in a function that is called whenever the signal is fired, however you're providing a function call. And you're missing parenthesis.</p>
<p>Lowercase <code>Workspace</code>... |
0 | Clarification on the rules of Pathfinding? | 11808841 | blowup999 | 659 | 2023-02-16 15:05:59 | <p>Sorry for all the text, I couldn't find these specifics in the documentation.</p>
<p>I'm working on a game that loads maps from strings - this is necessary for a number of reasons, but I'm not sure if it would affect pathfinding if the map is 'created' at the start of the game. Most games have it pre-created in work... | 133079 | 1 | 120193 | 1 | 1014156252 | Puppynniko | 1059 | 2023-02-21 13:45:45 | <p>roblox pathfinding uses a nav mesh/Navigation mesh you can turn it on in studio settings and see it for your self if it doesn't update for the new generated parts then that would mean pathfinding would not work btw im pretty sure its generated by the server or something not as a exportable thing "Lastly, I'm assumin... |
0 | How would I configure the lighting to make parts colorful but the environment dark? | 355374505 | EnderGamer358 | 77 | 2018-04-19 02:32:20 | <p>:I'm making a game where I want it to be pitch-black (unless a point light/surface light/etc. is present), and I figured out to do this is you have to set the brightness and outdoor ambient to 0. I did so, but it makes the other parts seem so bleached out and bland. I want the other parts to look really colorful whe... | 57067 | ||||||||
0 | CFraming models | 49776603 | TomsGames | 225 | 2014-02-18 20:20:01 | <p>Hey!</p>
<p>Alright, so I want to clone an object from replicatedstorage (Let's call it car) and place it into a model (Lets call it road) in workspace explorer. Then in the game I want to move this car onto a pad which is part of road. I have tried <code>car:MoveTo(Vector3.new(pad.Position))</code> (Since it is a p... | 70 | ||||||||
0 | How to Save a players unlocked worlds? | 858529530 | BearGamesZ | 4 | 2022-01-14 05:30:29 | <p>I have a simulator game and with coins, you can unlock different areas that contain other eggs, etc. But when you leave and the rejoin thsoe areas are not saved. How would I save that to leaderstats or put into a dattasave script?</p>
| 128891 | 1 | 116716 | 0 | 51697211 | AronYstad | 101 | 2022-01-14 13:42:57 | <p>You could use boolean values (either as an instance or in a script) and set them to true when the player has unlocked the area. Then you can just use a DataStore to store those values.</p>
|
2 | Explosions | 29806839 | ConnorVIII | 448 | 2014-03-19 17:14:58 | <p>With rockets and bombs, do force fields stop them from damaging the player.
I dont think it does, is there a certain block of code you can insert to make the explosion not damage an FF'ed player?</p>
| 791 | 3 | 1228 | 7 | 11141840 | trogyssy | 221 | 2014-03-19 17:23:57 | <p>The forcefield should prevent damage from the explosion itself.</p>
<p>If there are any additional scripts used to deal damage, make sure they go like this (I'll use 20 for an example):</p>
<pre class='brush: lua'>pathtohumanoid:TakeDamage(20)
</pre>
<p>Rather than like this:</p>
<pre class='brush: lua'>Humanoid.Hea... |
0 | How do I disable the dialogue colour on the start of a text when clicked with button? | 124963457 | notfenv | 171 | 2019-05-29 04:05:42 | <p>So you must of seen those border games where they inspect your papers, mine is technically like that but they have no blue at the start, Plus they click a button, they do not say it, when I click mine, it gives the blue at the start, I will show the script and image.</p>
<pre class='brush: lua'>local LastNext = tick... | 80875 | 1 | 75285 | 1 | 15912341 | PhantomVisual | 992 | 2019-05-29 07:33:16 | <p><code>:Chat()</code> has a third parameter where you can change the color. If you set it to white, it'll match the color of what the bubble chat normally looks like.</p>
<p><a target="_blank" href="https://developer.roblox.com/api-reference/function/Chat/Chat">https://developer.roblox.com/api-reference/function/Chat... |
0 | Why won't this CFrame's work? | 48161297 | 951753lolguy | 2 | 2015-02-23 00:56:09 | <p>So here is the script:</p>
<pre class='brush: lua'>local tool = script.Parent
local chr = tool.Parent.Parent.Character
local handle = tool:FindFirstChild("Handle")
tool.Equipped:connect(function()
if tool and chr then
local la = chr:FindFirstChild("Left Arm")
torso = chr:FindFirstChild("Torso")
... | 15231 | ||||||||
0 | Why does my script send me error in output if I it's propably good? | 317549109 | Ambulans1234 | 0 | 2022-09-16 18:26:50 | <p>So.. I have problem with my script as you can see int title.</p>
<p>I've been trying to do system in my gui that will show category that you clicked on or change showed category to category that you clicked on.(Yes I know it's hard to understand but if you see my code you should know what's going on)</p>
<p>Here's t... | 131642 | ||||||||
1 | My AI only moves to the first node? | 1924093 | ChiefWildin | 295 | 2014-02-25 04:08:10 | <p>The following is an AI for a zombie pathfinding system that moves the zombie along Vector3 coordinates dictated by the real brains behind my pathfinding system (an A* solution). My problem is that, even though I put in a section to deal with this problem, the zombie only moves to the first Vector3 value given.</p>
<... | 291 | ||||||||
0 | How would I make it so people with a group rank get kicked? | 1157595744 | BoogaBoogaHolder123 | 4 | 2021-06-08 21:27:06 | <p>As you see, that is my question. I already have the group rank numbers, but I'm not sure how.</p>
| 124208 | ||||||||
2 | How do I make make math.random() return a float value? | 3509467 | piRadians | 297 | 2018-09-08 01:06:41 | <p>I know you can do that by simply doing math.random() with no parameters, but how would I make it a float between certain numbers?</p>
<pre class='brush: lua'>local random = math.random(5,15)
print(random) -- note, I want this to return a decimal/float value between 5 and 15. Is that possible? if so, how?
</pre>
| 67058 | 2 | 64477 | 0 | 5229789 | RAYAN1565 | 691 | 2018-09-08 02:04:54 | <p>Depends how many decimal places you want. If I want one decimal place then I'd do the following:</p>
<pre class='brush: lua'>local value = math.random(50, 150)
local valueAdjusted = value/10
print(valueAdjusted)
</pre>
<p>If you want more decimal places, just add more zeroes. For instance, three decimal places:</p>
... |
0 | how do i check if a player is touching a part? | 100717824 | UnforgivenJr3087 | 26 | 2019-09-28 17:56:59 | <p>would help me out quite a bit</p>
| 88063 | 1 | 81618 | 0 | 20111088 | royaltoe | 5139 | 2019-09-28 18:02:19 | <p>Using part's Touched event:</p>
<p>The code below says when the parts touch event is fired, call the following function:</p>
<pre class='brush: lua'>part = game.Workspace.Part
part.Touched:Connect(function(itemTouchingPart)
print("Item touching part: ", itemTouchingPart)
--Now we're going to see if the thing... |
1 | Getting Character from player? | 49316000 | IntellectualBeing | 430 | 2014-04-22 06:43:04 | <p>I want to parent something into a players torso but I need to get the players character first.</p>
<p>I have heard of game.Players:GetPlayerFromCharacter(player)</p>
<p>How would I get the Character from the player?</p>
| 3257 | 1 | 4547 | 7 | 21540827 | Articulating | 1335 | 2014-04-22 06:47:02 | <p>The Player object has a Character property. This leads to the Character of the Player (if the player has one).
For example:</p>
<pre class='brush: lua'>Game.Players.Players.PlayerAdded:connect(function(Player)
repeat wait() until Player.Character --Wait until the Player has a character
Player.Character:Destr... |
2 | Is OOP possible on instances(parts) in Roblox? | 24090816 | CodeSponge | 125 | 2015-04-12 19:22:28 | <pre class="brush: lua">Cube = something...
function up(self, y)
self.Position = self.Position + Vector3.new(0, y, 0)
end
Cube:up(1)
</pre>
| 16630 | 3 | 19993 | 1 | 3508838 | DigitalVeer | 1473 | 2015-04-12 21:12:42 | <h2>Yes! It is possible!</h2>
<p>You also don't have to use metatables to achieve the task.</p>
<p>You can set up a little system such as the following:</p>
<pre class="brush: lua">Cube = workspace.BasePlate
function instanceHandler(cube)
local object = { }
local Cube = cube
function object:up(y)
cube.Position = c... |
1 | Trying to do the math of a asset loading bar, help? | 18205436 | hudzell | 238 | 2014-07-10 06:08:19 | <p>So I am trying to make a bar that calculates how many assets in a table there are to load and then every asset the bar progresses the correct amount. How would I do this? Here is the script:</p>
<pre class='brush: lua'>game.Players.PlayerAdded:connect(function(plr)
local gui = script.Welcome:Clone()
gui.Pare... | 7883 | 1 | 10232 | 0 | 2933011 | Nickoakz | 231 | 2014-07-10 06:33:46 | <p>Could this be your code?</p>
<pre class='brush: lua'>for num, asset in ipairs(assets) do
local m = #assets
local bar = gui.Background.Progress.Bar
gui.Background.Preload.Text = "Preloading asset "..asset.." ("..num.."/"..m..")"
game:GetService("ContentProvider"):Preload("http://www.ro... |
2 | How do I detect if an unanchored part is unable to move because it is crushed in place? | 25568705 | guestnot99 | 112 | 2019-02-02 04:36:16 | <p>Is there some event that can help detect if the part is not moving not because it is anchored, but because it is stuck in place by friction or unable to feasibly move elsewhere</p>
| 75570 | ||||||||
0 | Why does this script only work in Studio mode? | 28704965 | Seraine | 103 | 2015-05-03 20:30:07 | <p>I used a local script for this:</p>
<pre class="brush: lua">function onButtonClicked()
wait(0.1)
game.Players.LocalPlayer:LoadCharacter()
game.Players.LocalPlayer.PlayerGui.Bloxikin.Frame.Visible = false
game.Players.LocalPlayer.PlayerGui.Flash.LocalScript.Disabled = false
end
script.Parent.MouseButton1Down:connect(... | 17251 | 1 | 20642 | 2 | 1964162 | dyler3 | 1510 | 2015-05-04 01:19:18 | <p>Most of the time when people can't get things to work in Online mode that work in Studio, it's because they're using the wrong kind of script. Same case here.</p>
<p>Now, to fix the problem we would need to change this into a normal Script. The only problem with this is that you're not going to be able to access <co... |
0 | Does UserInputService respond on phone/tablet accessory keyboards? | 101726627 | cherrythetree | 68 | 2020-09-13 14:40:40 | <p>There are accessory keyboards that are either Bluetooth, or Micro-USB (for Android phones) or Lightning port (for iPhones) to put it on your phone/tablet's charging port and works fine as a normal PC keyboard but on a portable one, but I'm wondering if UserInputService still inputs a key pressed on the accessory key... | 113117 | ||||||||
1 | How to do spaces when finding things in character? | 25038102 | feeliirie | 5 | 2015-03-20 20:52:11 | <p>For example,</p>
<pre class="brush: lua">function PlayerJoined(p)
game.Workspace.p.Character.Right Leg:Destroy()
end
game.Players.PlayerAdded:connect(PlayerJoined)
</pre>
<p>This won't work, I think because of the space between Right and Leg. Here is really what I'm asking :/</p>
<pre class="brush: lua">game.Workspa... | 15919 | ||||||||
0 | Attaching a viewmodel to the camera while using a spring? | 32519295 | qTruta | 0 | 2019-02-03 14:43:34 | <p>Hello guys.</p>
<p>I'm trying to make some first person animations and I wanted to make everything seem a bit more realistic by adding a bit of model sway. The problem is that once I added the sway, the viewmodel doesn't stick to the camera anymore. <a target="_blank" href="https://youtu.be/yfnp65Giea0">Here's what ... | 75659 | ||||||||
0 | How to give More People Colored Chat in this Way? | 275193222 | mistergamer100 | 0 | 2018-04-27 20:27:32 | <p>-- // FileName: ExtraDataInitializer.lua
-- // Written by: Xsitsu
-- // Description: Module that sets some basic ExtraData such as name color, and chat color.</p>
<p>local SpecialChatColors = {
Groups = {
{
--- ROBLOX Interns group
GroupId = 2868472,
Rank = 100,
ChatColor = Color3.new(175/255, 221/255, 1),
},
{
--- ... | 57512 | 2 | 56203 | 0 | 89430243 | Kiriot22 | 3227 | 2018-04-27 20:34:04 | <pre class='brush: lua'>local ChatService = require(game:GetService("ServerScriptService"):WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))
local userColors = {
['275193222'] = Color3.fromRGB(170, 0, 170),
--^this is the userid,
['321133177'] = Color3.fromRGB(255,0,0),
}
game:GetService("Playe... |
0 | Giving player a tool from rs when touching a part not working? | 984384728 | RebornedSnoop | 165 | 2020-07-12 10:48:04 | <pre class='brush: lua'>local arrow = game.ReplicatedStorage.Arrow:Clone()
local plr = game.Players.LocalPlayer
local debounce = false
script.Parent.Touched:Connect(function()
if not debounce then
debounce = true
arrow.Parent = plr.Backpack
debounce = false
end
end)
</pre>
<p>A tool ... | 108851 | 1 | 99938 | 2 | 126659427 | VerdommeMan | 1162 | 2020-07-12 12:36:56 | <p>Is the localscript located in the workspace ? if it is then the localscript wont run</p>
<p><a target="_blank" href="https://developer.roblox.com/en-us/api-reference/class/LocalScript">see this article</a></p>
|
1 | How to make gui visible for a certain team? | 845235190 | blue_bunny0fficl | 98 | 2023-01-13 16:31:51 | <p>This is what i've tried script in serverscriptservice</p>
<pre class='brush: lua'>for i, v in pairs (game.Teams:WaitForChild("D"):GetPlayers()) do
script.parent.parent.parent.StarterGui.ScreenGui.Enabled = true
end
</pre>
<p>Team name is D
Don't know what I am doing wrong?</p>
| 132824 | 1 | 119959 | 2 | 1357830938 | DindinYT37 | 212 | 2023-01-13 19:11:11 | <p>I'm trying to say this respectfully but, in my opinion, what you're doing is entirely wrong.</p>
<p>First, you're enabling it in the <code>StarterGui</code>, not the <code>PlayerGui</code> of any user.
Second, you should always use <code>.Parent</code> instead of <code>.parent</code>, as far as I know it's a depreca... |
1 | MP3 Player Script Will Play The First Song When You Click Next But Not The Second, Any Help? | 266723646 | AIetheo | 236 | 2017-11-05 15:16:15 | <p>So when I click the next button on it it will play the first time but when I click it again it will not play the next song.</p>
<p>Error:
<code>Players.FuriaI.PlayerGui.mp3player.BackGround.Main:69: bad argument #2 to 'random' (interval is empty)
09:13:23.975 - Stack Begin
09:13:23.976 - Script 'Players.FuriaI.Playe... | 49175 | 1 | 49306 | 0 | 14601325 | KidTech101 | 376 | 2017-11-05 15:31:56 | <p>This might be my fault, in part, for giving a lackluster answer yesterday :p</p>
<p>When you pick a song, your <code>ChosenSong</code>, you remove the song from the array SoundIds. After a couple of removals, there are no ids left in SoundIds, so #SoundIds returns 0. math.Random(1, 0) errors because (1, 0) is an inv... |
0 | Why is my animation not playing when button is pressed? | 86705930 | YT_GamingDan | 5 | 2021-02-21 21:10:37 | <p>I'm trying to make an animation button, where once you press the button an animation will play, but i dont know why my script isn't working. This is what I have so far:</p>
<pre class='brush: lua'>local emoteButton = script.Parent
local player = game.Players.LocalPlayer
local character = player.Character
local human... | 120481 | ||||||||
2 | CFraming not working, why? [Updated] | 90119348 | TheHospitalDev | 1134 | 2015-11-29 20:07:43 | <p>I have a script which is meant to move the model "PLT", short for platform, 9 studs back and 25 to the left, but it doesn't work?
Does it work with Models or just parts/unions????</p>
<pre class="brush: lua">function click()
if(script.Parent.Status.Value)=="Closed" then
script.Parent.Status.Value="Opening"
movements... | 24832 | ||||||||
1 | Roblox Scripting | Adding an main menu after an loading screen. Help? | 1370082835 | VikkiVuk | 74 | 2020-08-31 09:48:06 | <p>Hi! So i was trying to add an main menu after my custom loading screen was gone. I tried to do this in 2 different variants, one was to try and set the bool value to true and then in the main menu gui script add</p>
<pre class='brush: lua'>local loadingDone = game.ReplicatedStorage.loadingScreenDone
if loadingDone.V... | 112453 | 1 | 103283 | 0 | 182139900 | WideSteal321 | 769 | 2020-08-31 09:59:59 | <p>I hope I’m correct... but your script that checks if the value is true only checks ONCE.
You will need to loop this, there are many ways to do this but the most simple way is just using <code>while true do</code>, like this:</p>
<pre class='brush: lua'>local loadingDone = game.ReplicatedStorage.loadingScreenDone
whi... |
0 | How do I change the CollisionGroupId on a player? | 64291305 | uhTeddy | 101 | 2018-02-20 18:51:29 | <p>I am working on a project were I need to change the collision group ID. I tried two ways in my scripts but neither are working please help.</p>
<pre class='brush: lua'>game.Players.PlayerAdded:connect(function(player)
local character = workspace:FindFirstChild(player.Name)
for i,v in pairs(character:GetChild... | 54015 | ||||||||
0 | Owner Teams. | 54423626 | ChandlerTech | 5 | 2014-02-17 05:04:13 | <p>Say I have an owners team, but I only want it to show up when I join. How would I do it?</p>
| 22 | 2 | 47 | 3 | 849264 | blocco | 185 | 2014-02-17 05:17:31 | <p>What you would want to do is create a function which is called whenever a player joins. This function would check if the player is the creator of the place. If the player <em>is</em> the creator of the place, it would add a team to the game which only the creator could join. I added some extra functionality to the s... |
1 | How to filter a custom chat? | 1098704750 | Trampyling | 43 | 2023-03-27 17:07:27 | <p>I want to know the name of the function used to filter text, aka tagging chats, and how to use to the function for my custom chat.</p>
| 133244 | 1 | 120287 | 1 | 559514967 | T3_MasterGamer | 2189 | 2023-03-28 11:03:37 | <p>You can use <a target="_blank" href="https://create.roblox.com/docs/reference/engine/classes/TextService#FilterStringAsync"><code>TextService:FilterStringAsync()</code></a> then use <a target="_blank" href="https://create.roblox.com/docs/reference/engine/classes/TextFilterResult#GetChatForUserAsync"><code>TextFilter... |
0 | I need help with a player avatar gui image??? | 547784746 | Lamborghinihurican0 | 4 | 2022-06-17 17:44:21 | <p>My error is at line 10 and 9. I am trying to show the player avatar on a gui shown to all players.
My error in the output is "Nil" and I believe it is the print function. but it is caused by line 10</p>
<pre class='brush: lua'>local pic = script.Parent
local player1 = game.ReplicatedStorage.heist1Values.Player1.Play... | 130379 | 1 | 117729 | 0 | 368080440 | VAnkata20 | 49 | 2022-06-17 19:07:05 | <p>Tried it in studio and it works like that</p>
<pre class='brush: lua'>local pic = script.Parent.pic
local player1 = game.ReplicatedStorage.heist1Values.Player1.PlayerName
print(player1.Value)
while wait(0.1) do
if player1.Value ~= "none" then
local player = game.Players:FindFirstChild(player1)
pr... |
0 | How can I move the player to a Part? | 34239179 | bruceywayne | 35 | 2017-11-05 17:59:21 | <p>Hey. I'm trying to move the player to a Part's position but it doesn't work. Any ideas why?</p>
<p>This is the code:</p>
<pre class='brush: lua'>local b = Instance.new("BodyPosition")
b.position = Vector3.new(game.Workspace.Point.Position)
b.maxForce = Vector3.new(500000000, 500000000, 500000... | 49184 | 2 | 49316 | 1 | 25730176 | stefanb01 | 75 | 2017-11-05 18:03:07 | <p><a href="http://wiki.roblox.com/index.php?title=API:Class/Humanoid/MoveTo">http://wiki.roblox.com/index.php?title=API:Class/Humanoid/MoveTo</a></p>
<p>On the Character's Humanoid do this:</p>
<p><code>Humanoid:MoveTo(part.Position)</code></p>
<p><code>Humanoid</code> being the Humanoid object of the character</p>
<p... |
0 | how to make a value for all players? | 528075096 | jeboysisi | 26 | 2022-08-01 11:10:35 | <p>I need a value to count up something that's for all players, but I don't know how.
For example Player1 clicks on a button and the value goes +1 (so now it's 1)
Player 2 does the same now the value is 2.</p>
<p>I need it for a egg hatching system to count the amount of each pet that is hatched.</p>
| 131036 | 2 | 118380 | 1 | 72947278 | peter21340 | 41 | 2022-08-01 12:27:08 | <p>This can be done very easily by creating a single value and adding to the value every time an egg is hatched.</p>
<pre class='brush: lua'>local EggsHatched = workspace.Values.EggsHatched -- Assuming the value "EggsHatched" is in workspace inside a folder called Values.
-- Run this code on the server below every time... |
0 | Anyway to calculate velocity before impact? | 1565853299 | KneeDeepInTheDoot | 4 | 2021-02-23 02:59:47 | <p>I want to make a sound system that makes a sound whenever an object gets thrown hard into a wall, like the Source engine.</p>
<p>I'm sorry but I don't have script samples, I just want to find out how to do this.</p>
| 120546 | ||||||||
0 | How do I use Math Random? | 33035751 | NecoBoss | 194 | 2014-06-01 02:29:38 | <p>I have been trying to figure out how to use the mathrandom to generate a random wait time from 50 to 100 seconds. Can anybody help?</p>
| 5966 | 2 | 7921 | 2 | 17514438 | TheeDeathCaster | 2336 | 2014-06-01 02:33:29 | <p>Ok.. Math.random() does a random number that is between one and another number, so if you are doing 50 and 100, math.random(50,100) would choose a random number between 50 and 100.
I hope this helped! ;)</p>
|
1 | How Can I use GetPlayerFromCharacter() to detect If the NPC summoned by a zombie staff? | 1961959172 | imnotaguest1121 | 89 | 2022-06-23 15:09:48 | <p>I wanted to script a weapon that summons zombies that follow the owner (The person who summoned them) and whoever comes near the zombies following the owner, It will target the said person and stop If the person died, I was told to use <code>GetPlayerFromCharacter()</code> to see If the zombies are touching there re... | 130480 | ||||||||
0 | Team only GUI | 20662792 | PsychoJordan | 5 | 2014-03-21 03:27:31 | <p>I know there is a way to make a Team-only GUI because most clans have it that way. Anyways, how do you make a GUI for one team ONLY?</p>
| 828 | 2 | 1286 | 1 | 20901244 | Aethex | 255 | 2014-03-21 03:36:08 | <p>The easiest way, to my belief, to do this would be to use the <a target="_blank" href="http://wiki.roblox.com/index.php?title=PlayerAdded_(Event)">PlayerAdded</a> event and check the player's team before they join. You could store the GUI in ReplicatedStorage and put a script in the Workspace to check if the player ... |
1 | How function void:void() works? | 74087102 | Ziffixture | 6913 | 2018-12-29 01:01:08 | <p>I’ve been studying a bit more on Lua API to strengthen my ability, and I came across this weird method of writing a function that I personally have never seen before, the formality look somewhat like this, <code>function void:void()</code>. Could someone explain this to me? Also is there a possible way to write this... | 73218 | 1 | 69165 | 2 | 908765185 | AbstractionsReality | 98 | 2018-12-29 15:39:53 | <p>Updated the whole answer</p>
<p>Lua is not an Object Oriented Program, which is why we use tables and metatables to replicate one. Your line was as follows</p>
<p><code>function void:void ()</code></p>
<p>The first <code>void</code> is refered to the table that contains the function. Since <code>void:void</code> is ... |
0 | Why does my code to send a message on chat by clicking on a gui not work? | 1896915549 | NoobciderLXKD2 | 5 | 2023-01-13 00:52:22 | <p>No problems shows in the editor, i can't seem to be able to fix this.</p>
<pre class='brush: lua'>local function leftClick()
game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{
Text = ("Angry Munci has Spawned!");
Color = Color3.new(255,255,255);
Font = Enum.Font.Creepster;
FontSize =... | 132821 | 1 | 119955 | 5 | 376124796 | C1RAXY | 81 | 2023-01-13 03:21:33 | <p>I don't see anything wrong with your code, make sure to run the script in <code>LocalScript</code> and I think it should work for you. :)</p>
|
1 | How do you make a leaderstat damage system? Pls help!;-; | 1947257869 | xGlacier101x | 9 | 2022-06-21 09:50:22 | <p>I tried to make a system that when the leaderstats reaches zero, the player takes damage.
I've tried lots of methods, bit it still don't work</p>
<pre class='brush: lua'>local Players = game:GetService("Players")
local plr = Players.LocalPlayer
local PlayerMoneyValue = plr.leaderstats.Reality.Value
while true do
... | 130435 | 1 | 117771 | 0 | 754480402 | sleazel | 1282 | 2022-06-21 11:40:53 | <p>[EDIT: corrected humanoid damage]
By doing this:</p>
<pre class='brush: lua'>local PlayerMoneyValue = plr.leaderstats.Reality.Value
</pre>
<p>You are only saving INITIAL money value to <code>PlayerMoneyValue</code> variable. To make this script work, you need to keep a reference to the <code>intValue</code> object, ... |
0 | How do I make a vehicle for water? | 43338508 | Bladeor | 0 | 2014-04-15 02:05:22 | <p>Does anyone know how to make a boat for terrain water? I don't want to make a paddle boat...</p>
| 1436 | 2 | 1907 | 2 | 2933011 | Nickoakz | 231 | 2014-04-15 02:10:02 | <p>You are able to make a boat for water by replacing the wheels or cylinders to a square brick with parts connected to it. It should look similar to this..
<em>http://postimg.org/image/bqog7qkgp/</em></p>
|
0 | How to make a randomised music system with a mute button? | 254090301 | lukepillingrblx | 2 | 2022-04-09 13:22:57 | <p>Hi, I have a script right now that randomises the music on my game but the problem is I've tried but I just cant figure out how to add a mute button to it.</p>
<p>I don't mind changing the music system as long as it still picks a random song and can mute.</p>
<p>Script for random song:</p>
<pre class='brush: lua'>wa... | 129590 | ||||||||
0 | towers arent spawning in tower defence game im making. whats going on? | 53275002 | pixtowo | 0 | 2022-11-24 02:32:30 | <p>making a tower defence game, im pressing a button that places a tower but nothing spawns, and nothing happens at all, and theres no errors, this happened after i added some functions that check if the tower is able to be spawned or not.
Module script:</p>
<pre class="brush: lua">function Tower.Spawn(player, name, cf... | 132359 | ||||||||
0 | Laser Gun Beam Not Shooting Correct Direction? | 1024248310 | MarcTheRubixQb | 153 | 2023-03-05 20:43:08 | <p>Hello developers. I am currently making a laser gun with a long laser beam that shoots out when you click. However, the laser beam doesn't go straight, but it goes to the center of the object I am shooting at. I was wondering how I could make the laser beam go straight no matter what is in the way and so it doesn't ... | 133148 | ||||||||
0 | How can you create an algorithm that places something randomly? | 422291300 | Hallohallo98 | 2 | 2021-10-13 13:42:28 | <p>Hey, I'm working on a game where there are always two buttons at the bottom that are supposed to have random text on them, but that's another question, the question of this thread is how do I make it so that when I press it at the bottom and it says for example "Ice" and I press it and it first fetches the part from... | 127851 | 1 | 115873 | 0 | 1032618075 | FantasticFrontierGuy | 33 | 2021-10-14 07:41:16 | <p>First of all, your supposed to try and make the script yourself. Secondly, don't use replicated storage, their is server storage for a reason. Now I am going to give you the script but next time actually try and do it yourself...</p>
<p>I am guessing you want the player to press a TextButton.</p>
<pre class='brush: ... |
1 | Explosion cloning itself twice? | 140399066 | Uniplier | 29 | 2022-09-17 23:17:37 | <p>i have this ability that I've been working on, when used its used an explosion is cloned at the torso of the enemy you are targeting. The problem is, the explosion appears twice, only one of these explosions actually does damage, but 2 explosions coming out is unideal</p>
<pre class='brush: lua'>if val2:find("Detona... | 131657 | 1 | 118909 | 1 | 94006350 | BulletproofVast | 901 | 2022-09-18 15:27:57 | <p>The script here seems fine, it may have something to do with one of the modules that you are using, or maybe another script that you have that also clones it. Theres also the possibility of you running the code more than once but from what i see here, this part wouldn't be the issue. Also don't remove clone() as it ... |
1 | Help with Gui movement? | 14451219 | Cataclyzmic | 93 | 2014-02-25 19:31:06 | <p>I'm working on a 2d game, not a remake of flappy bird, but one thing in flappy bird. Is what i need help on.</p>
<p>(Here is the game: <a href="http://www.roblox.com/Flappy-Bird-place?id=22643989">http://www.roblox.com/Flappy-Bird-place?id=22643989</a>)</p>
<p>How would i make something keep appearing, as the tubes ... | 296 | 1 | 542 | 0 | 64408300 | RaverKiller | 668 | 2014-02-25 19:34:16 | <p>Well, basically you need to use a for loop to create pipes in many different locations, you increase the X increment each time, you could also use the modulus operator to vary the sizes. You put all the pipes in the same frame as the background frame. After you've set that up, you must use the for loop to distinctly... |
1 | How do you pass information in scripts though remote events? | 1288500822 | Finty_james | 269 | 2021-03-26 12:28:36 | <p>I tried to pass information from the client to the server, but it didn't work. I tried remote events, bindable events, remote functions, bindable functions, but none of them worked. Can someone help me? here is my code for client: `mouse.KeyDown:Connect(function() game.ReplicatedStorage.RemoteEvent:FireServer(brickc... | 121698 | 1 | 110863 | 0 | 419000434 | Omq_ItzJasmin | 666 | 2021-03-26 12:55:27 | <p>The <code>KeyDown</code> function is deprecated, It's better to use <code>UserInputService</code> instead</p>
<p><a target="_blank" href="https://developer.roblox.com/en-us/api-reference/class/UserInputService">https://developer.roblox.com/en-us/api-reference/class/UserInputService</a></p>
<pre class="brush: lua">lo... |
0 | BrickColor | 56756914 | IncognitoPlane | 0 | 2014-03-04 01:50:53 | <p>Ok so I made a function script to that if a something touches a brick, then it makes another brick turn a different color, but I wont work so here is my script</p>
<pre class="brush: lua">function onTouched(hit)
Workspace.Papi1.BrickColor = BrickColor.new("Institutional white")
wait(0)
end
script.Parent.Touched:... | 472 | ||||||||
1 | How would you script fireball or any part based projectile weapon? | 111523961 | Azure_Kite | 870 | 2019-12-15 11:20:49 | <p>The way i do it is the make the trigger, getting the mouse position, on the client side,
and do everything else on the server side, from creating the projectile, its visual, setting its velocities, and collision detection.</p>
<p>I'm sure theres a lot more efficient algorithm out there, how would you script your fir... | 91418 | ||||||||
0 | {Answered} How do I make a loading screen? | 529859410 | JackyW9cky | 27 | 2020-07-21 17:22:44 | <p>So, I have been trying to make a loading screen for my game when the game is done loading for the player that played my game, the loading screen gets destroyed using the :Destroy() command. Can someone please help me?</p>
| 109625 | 2 | 100755 | 0 | 566296650 | raid6n | 2196 | 2020-07-21 17:24:51 | <p>this may help you: https://developer.roblox.com/en-us/articles/Custom-Loading-Screens</p>
|
0 | [Solved] Is it possible to edit the ROBLOX BC Icons? | 15297810 | xXScorpianKillerXx | 25 | 2014-03-12 05:31:12 | <p>I remember seeing in a game, when the Owner joined a game, they had a custom BC Icon. I was wondering, is this still possible?</p>
| 645 | 2 | 1029 | 0 | 42974574 | Tryptic | 5 | 2014-03-12 08:45:23 | <p>http://www.roblox.com/Custom-Player-List-item?id=133886770</p>
|
0 | invalid argument #2 (Vector3 expected, got table) ??? | 278643244 | MLGGAME08 | 7 | 2022-09-10 12:05:30 | <p>I wanted to learn how to make fps framework but i got this error can someoen help me??</p>
<p>The script--</p>
| 131571 | ||||||||
1 | Find an empty plot with no owner? | 1251627904 | CodeWon | 121 | 2021-03-20 16:59:56 | <p>I'm trying to make plots and and I have a plots folder, a plot model in the folder, and a string value named owner in the plot model. I'm trying to make a function that finds a plot where the owner value is equal to nothing, and if it is, it will set the owner value to the players name. If the owner value already ha... | 121509 | 1 | 110699 | 1 | 419000434 | Omq_ItzJasmin | 621 | 2021-03-20 17:31:40 | <p>You can use a <code>for — do</code> loop</p>
<p><a target="_blank" href="http://https://developer.roblox.com/en-us/articles/Loops">https://developer.roblox.com/en-us/articles/Loops</a></p>
<pre class='brush: lua'>local folder = -- ur folder
local plots = folder:GetChildren()
for _,plot in pairs(plots) do
local v... |
0 | Gun script will not work for some reason? I'm using remote functions too! | 816236594 | BashGuy10 | 383 | 2019-07-26 01:13:55 | <p>I've solved this know, this answer is no longer in use.</p>
<p>LOCAL SCRIPT:</p>
<pre class='brush: lua'>local tool = script.Parent
local config = tool:WaitForChild("Config")
local remotes = tool:WaitForChild("Remotes")
local actionservice = game:GetService("ContextActionService")
local equipped = false
local reload... | 84448 | 1 | 78388 | 1 | 18664243 | lazycoolboy500 | 582 | 2019-07-26 01:40:56 | <p>My best guess is that on your "OnServerInvoke" function for the "canshoot" in the non-localscript side is that it will always return false therefore your localscript won't continue on the "MouseButton1Down" thing.</p>
<p>But other than that you might get better results if you put some "print" functions around to see... |
1 | Starting Countdown? Please help! | 5307110 | naruto12345677 | 5 | 2014-06-06 02:22:16 | <p>You know how there's like a 5 second countdown in some games(Like Murder Mystery) before the game ACTUALLY starts? Could someone help me make a script for this?</p>
| 6229 | ||||||||
0 | How can i kill player when i click on him by mouse ? | 883884971 | akramelbasiony1 | 0 | 2022-06-17 15:27:51 | <p>i want to do a game like hide and seak and i cant cant now how to kill the player when i click on him my mouse</p>
| 130378 | ||||||||
4 | Spawn() function - What is it? What is it used for? In what ways is it different than coroutines? | 14357591 | Perci1 | 4988 | 2015-04-16 21:32:02 | <p>I'm rather confused. Looking at the <a target="_blank" href="http://wiki.roblox.com/index.php?title=Function_Dump/Roblox_Specific_Functions#Spawn">wiki documentation of spawn()</a>, many things confuse me;</p>
<blockquote>
<p><strong>Spawn</strong></p>
<p>spawn (<em>f</em>) or Spawn (<em>f</em>)</p>
<p>Execu... | 16761 | 1 | 20137 | 10 | 19566737 | Unclear | 1776 | 2015-04-16 21:42:28 | <p>A <strong>thread</strong> is a group of computer instructions that can be executed by a task scheduler, in particular Lua's thread task scheduler. In simple words, it is a block of code that runs in serial.</p>
<p><a target="_blank" href="https://en.wikipedia.org/wiki/Multithreading_%28computer_architecture%29"><str... |
0 | How can I stop the camera from shaking when I tween the HRP? | 384310189 | packayee | 13 | 2022-05-12 22:39:52 | <p>Basically, I'm making a system where you click and it moves you forward. I tweened the HRP forward, but when the tween plays it shakes the camera. I don't want there to be camera shake at all, it looks like it's lagging whenever the camera jitters when you tween the HRP. Somebody suggested anchoring the HRP, but the... | 129982 | ||||||||
0 | Is there anythig wrong with this script? | 15454657 | GreekGodOfMLG | 244 | 2014-02-21 05:32:29 | <p>Well my studio wasn't acting right and figured I could ask on here and blah blah blah. Well I am testing this script on here. The objective of this script is to make a loop of a disco ball. Here it is :P</p>
<pre class="brush: lua">game.Workspace.Brick.Color = Vector3value(255,255,255)
While true do
game.Workspace.... | 191 | ||||||||
1 | Animation acting weird. Why is that?? | 379782887 | Shounak123 | 454 | 2022-11-22 07:44:52 | <p>My animation is simple. Only 2 keyframes in 0.2 seconds. Lets hold <code>KeyframePosition1</code> at 0.0 & <code>KeyframePosition2</code> at 0.2 seconds.</p>
<p>What this is supposed to play when used <code>Animation:Play()</code> is that It would move instantly to <code>KeyframePosition1</code> and then tween t... | 132342 | ||||||||
0 | Camera manipulation | 31619538 | Youllbekilled | 0 | 2014-02-17 06:54:20 | <p>I want to camera manipulate when someone enters but only enters not respawns but i do not know how, im am not the best scripter i only really know the basics, so please help me out, thank you.</p>
| 28 | ||||||||
1 | Some i,v in pairs() behavior I dont understand? | 78280248 | Wayyllon | 170 | 2021-01-27 18:47:34 | <p>So I'm trying to create a system where after selecting a random number it will set a value inside of a part and change its Color/Material</p>
<p>This is the code I have, and yes, I'm aware I have no clue what I'm doing.</p>
<pre class="brush: lua">GigaChunk = game.Workspace.GigaChunk
for i,v in pairs(GigaChunk:GetCh... | 119257 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.