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 | RemoteEvent wont fire and server script wont work, no errors in the console? | 1543400900 | Pro_beatz | 36 | 2022-07-29 20:48:13 | <p>So, this server script won't work, No errors or anything. I want it to fire a server when a player clicks a click detector but it won't work for some reason, I'd appreciate if you would help me!</p>
<p>Code:</p>
<pre class='brush: lua'>local RemoteEvent = game.ReplicatedStorage.Clothing
local Click = script.Parent
C... | 130999 | 1 | 118351 | 1 | 575273760 | DayLighter_09 | 20 | 2022-07-29 23:00:39 | <p>-- local</p>
<pre class='brush: lua'>local RemoteEvent = game.ReplicatedStorage.Clothing
local Click = script.Parent
Click.MouseClick:Connect(function(Clicked)
if Clicked.Name == game:GetService("Players").LocalPlayer then
RemoteEvent:FireServer()
end
end)
</pre>
<p>-- Server</p>
<pre class='brush: l... |
1 | How would I use something Similar to waitForChild on a table? | 1206157398 | I_UseAltAndVpn | 47 | 2019-09-20 08:35:21 | <p>so I insert Players userID inside a table it looks something like this</p>
<pre class="brush: lua">{1 = "Roblox", 2 = "IDKTHISPLAYER"}
</pre>
<p>but since this is inserted in player added</p>
<p>I was wondering How I could use something similar to :WaitForChild on a table</p>
<p>It would look something like</p>
<pre... | 87690 | 2 | 81249 | 1 | 52302097 | JasonTheOwner | 391 | 2019-09-20 11:19:43 | <p>So in your case you'll be waiting for a table to hold a value or player to be added to the table? I would check a table for the existence of a key value, instead of value, in order to make it easier to wait for the existence of playername added to it.</p>
<p>I suppose one thing you could do is run a function that co... |
2 | Scripts not working on a server. Only works on test mode? | 22653509 | MrHerkes | 166 | 2016-11-20 03:31:47 | <p>Hello! You must've heard me from my previous question about the landmine script problem (or not). Well I took advice from blowup999 (the person that helped me with my landmine script). It looked like my game was done, until when I created a server, some scripts were not working: my landmine script and my Press R to ... | 37353 | 1 | 39856 | 2 | 71379989 | whenallthepigsfly | 541 | 2016-11-20 04:10:30 | <p>Several things are wrong here. For one, you're attempting to essentially get input from the server. As the server isn't a player, and <strong>has</strong> no inputs to be bound to (Thru ContextActionService, or UserInputService) so your scripts are not working. You're also using direct references(EX: workspace.part.... |
2 | Do I have the difference from SetAsync() and UpdateAsync() correct? | 2479393 | Dfzoz | 345 | 2020-07-25 23:45:07 | <blockquote>
<p>I don't know if I have got the difference of <code>:UpdateAsync()</code> and <code>:SetAsync()</code> right...</p>
</blockquote>
<p>I want to show an example of how I think they should be used, can someone let me know if I am correct?</p>
<hr />
<p>Using only <code>SetAsync()</code>:</p>
<p><strong>Play... | 109977 | 1 | 101088 | 3 | 13667373 | LordDragonZord | 3546 | 2020-07-26 00:21:35 | <p>When you use <code>UpdateAsync</code>, you supply your own function that takes the argument of the player's old value. You return what the new value will be. Setting the Async will completely clear it and replace the saved data with the new one; therefore, your first example is correct. If you used UpdateAsync, it a... |
0 | Script checks if player is on red team then gives the player one point (check more text . -?) | 1044877460 | MariamOMG090 | 9 | 2023-02-07 23:57:32 | <p>How do I make it so after gives 1 point it makes a frame visible then kills all players in the server then makes frame not visible. I am trying to make it so when a player scores a point when he touches the part if makes a frame visible( game.StarterGui.RedTeamScored.Frame) then after like 1 second it kills all play... | 133039 | 2 | 120139 | 0 | 559514967 | T3_MasterGamer | 2189 | 2023-02-09 05:14:46 | <p>Instead of using the <a target="_blank" href="https://create.roblox.com/docs/reference/engine/classes/StarterGui"><code>StarterGui</code></a> to make the frame visible, you should use the <a target="_blank" href="https://create.roblox.com/docs/reference/engine/classes/PlayerGui"><code>PlayerGui</code></a> inside the... |
0 | How would I get a shirt's asset id from its template asset id? | 6278646 | cjcool12345 | 58 | 2015-01-25 20:29:43 | <p>I am making a closet with several pieces of clothing (shirts, pants, and t-shirts specifically). One problem I am having is that when a player switches out their clothing for the one on a rack it shows their old clothing as the clothing's template instead of the thumbnail of the clothing (I have a function to take a... | 14513 | ||||||||
0 | How to make it so you pay leaderstats currency to teleport to a part via GUI? | 1696235625 | Cubispaghettis | 1 | 2023-01-15 03:53:06 | <p>Hello, I have a scripting question. So I have it so there is a Text Button inside of a frame, inside of a Screen Gui, inside of Starter Gui. So basically I want the textbutton to teleport you to a specific part, but I also want it to make it so it checks if you have a specific amount of points and take that amount a... | 132841 | 1 | 119981 | 1 | 245864252 | xInfinityBear | 1691 | 2023-01-15 04:10:42 | <p>I recommend changing this script to a server script rather than using a remote event. I say this because you can still obtain the player in the server script, as the script is a descendant of the player. You also want to check/change leaderstat values on the server, as the client can manipulate and change them.</p>
... |
0 | How to make a badge checker with filtering enabled on? | 62725191 | minetrackmania | 186 | 2016-09-17 13:45:26 | <p>This script has to check every two seconds if a player have the badge, if not the X stays visible. But if they do the X goes away. This script works normaly but in this game I use filtering enabled and made the script localscript version. I tried a normal script but that even didn't work. Now it is Playergui > Gui >... | 35650 | ||||||||
0 | invincible for 3 seconds? | 16686825 | drahsid5 | 250 | 2014-03-02 06:20:49 | <p>I made a script for my custom health bar to make my player invincible for 3 seconds... didn't work, no output errors.
Anyone know whats wrong?
script:</p>
<pre class='brush: lua'>local Plr = game.Players.LocalPlayer
local Char = Plr.Character
script.Parent.Changed:connect(function(val)
if script.Parent.Value >0 t... | 433 | ||||||||
0 | How would I script for a player to "backspace" a tool by command? | 17984577 | Ethan_Waike | 156 | 2015-05-08 00:53:02 | <p>I know how to index it, just not how to drop it.</p>
| 17351 | ||||||||
1 | How do I disable swimming with water terrain? How do I spawn in water? | 111919417 | DecentDucky | 2 | 2020-04-12 11:59:24 | <p>I have two questions, how you disable swimming and how you spawn in water.
For the first question, how to disable swimming, I just want the player to ignore the water and act like it is air. They see the water, but do not come in contact with it.
With the second question I am just confused that player spawn is in th... | 98969 | 1 | 91440 | 1 | 537386450 | ArtemVoronin0 | 171 | 2020-04-12 12:04:07 | <pre class="brush: lua">local plr = game.Players.LocalPlayer
local char = plr.Character
local hum = char:WaitForChild("Humanoid")
hum:SetStateEnabled(Enum.HumanoidStateType.Swimming, false)
</pre>
|
0 | How to bind roblox's movement with arrow keys? | 1037012035 | WikiBaseHealthFinder | 40 | 2019-06-24 13:42:27 | <p>Im trying to make it so they can control the character with arrow keys instead of WASD but how?</p>
| 82412 | ||||||||
2 | How do I make it so when the color is green, a point will not be distributed? | 37745860 | BunjiBloxxer | 51 | 2022-10-12 23:18:34 | <p>I tried to make the part (pointPart) turn green when someone collects it and then make it uncollectable while it's green. Everything in the script works, but when the part is green, it will still add a point to leaderstats when someone touches it, I don't want it to.</p>
<pre class='brush: lua'>local pointPart = scr... | 131894 | ||||||||
0 | why do wheels fall off cars and trucks? | 7095200 | ags5321 | 0 | 2015-07-08 04:32:46 | <p>I no its not the rght type of questions but really why do they fall off</p>
| 19491 | 2 | 23089 | 1 | 27621739 | FiredDusk | 1466 | 2015-07-08 04:35:38 | <p>Mabey it does not have a hindge.
Try that.</p>
<p>If you need help, msg me!</p>
<p>Make sure if this help to accept my answer!</p>
|
0 | Correct use of IsKeyDown()? | 35351404 | lacikaturai | 89 | 2016-11-13 22:15:02 | <p>I'm trying to detect the w key being held down, with the IsKeyDown function. And I'm pretty sure I'm not going at this correctly. How can I detect so I can just print something?</p>
<pre class='brush: lua'><br />UIS = game:GetService("UserInputService")
if UIS:IsKeyDown(Enum.KeyCode.W) then
print("w")
end
</pre... | 37188 | 2 | 39673 | 0 | 173088939 | OldPalHappy | 1477 | 2016-11-13 23:11:51 | <p>You're using it correctly.</p>
<p>The problem is that the script runs this code once at the start of the game.</p>
<p>You <em>could</em> use a while loop to fix this,</p>
<pre class='brush: lua'>local UIS = game:GetService("UserInputService")
while wait() do
if UIS:IsKeyDown(Enum.KeyCode.W) then
print("w... |
0 | How do i fix this? it says SetAsync() and GetAsync() isnt a part of data store service | 1341499453 | sonichfan | 62 | 2021-05-31 14:22:19 | <p>local DStoreService = game:GetService("DataStoreService")
local CashStore = DStoreService:GetDataStore("Cash")</p>
<p>game.Players.PlayerAdded:Connect(function(plr)</p>
<pre class="brush: lua">local CashValue = plr:WaitForChild("leaderstats"):WaitForChild("Cash").Value
DStoreService:UpdateAsync("plr_"..plr.UserId, C... | 123936 | ||||||||
0 | How do you check what team a player is on using an "if" statement? | 17030889 | nilVector | 812 | 2014-04-26 17:59:51 | <p>I'm having trouble with this:</p>
<pre class='brush: lua'>game.Players.PlayerAdded:connect(function(player)
if player.Teams == Spectators then
player.CameraMode = "LockFirstPerson"
end
end)
</pre>
<p>Thanks in advance!</p>
| 3610 | 2 | 5013 | 2 | 3289648 | YaYaBinks3 | 110 | 2014-04-26 18:07:13 | <pre class='brush: lua'>function getTeamsColorFromName(name)
local color
for _,v in pairs(game.Teams:GetChildren()) do
if v.Name == name then
color = v.TeamColor
end
end
return color
end
game.Players.PlayerAdded:connect(function(player)
repeat wait() until player ~= nil -... |
1 | How would you teleport a player to a game but its not listed on their recently played? | 69308985 | xXKillerMurderarXx | 59 | 2019-02-15 17:44:43 | <p>Can someone help me?
How would you make a player teleport to a game BUT the game they are teleported to is not listed on their "Recently Played" ?</p>
<p>It always teleports players to the game and shows it on their recently played, how do I prevent this???</p>
<p>Do i use PrivateServer?</p>
| 76255 | ||||||||
0 | Camera script suddenly broke on me | 6795437 | ChosenDreamer | 5 | 2014-03-02 20:20:29 | <p>It was working a while ago in my game, but now it suddenly stopped working properly.</p>
<p>WHAT IT IS SUPPOSED TO DO: Block you from zooming out, body and person follows where the mouse it; basically a third person camera that prevents you from zooming in or out, and follows the mouse.</p>
<p>WHAT ITS DOING NOW: It... | 447 | ||||||||
1 | This animation won't play online | 25516705 | Raditok | 5 | 2014-02-27 00:28:44 | <pre class="brush: lua">script.Parent.ClickDetector.MouseClick:connect(function(playerWhoClicked)
local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/Asset?ID=147619125" -- your id here
local animTrack =script.Parent.Parent:FindFirstChild("Humanoid"):LoadAnimation(animation)
-- ch... | 321 | ||||||||
0 | How do I fix attempt to index nil with 'className'? | 193503404 | Geozify | 9 | 2021-05-02 18:46:23 | <p>Hello,</p>
<p>I have a serverscript that doesn't work, and I have no idea why..</p>
<p>I'm trying to revamp an old Minigames game, but I'm not the best at scripting, so here is the code:</p>
<pre class='brush: lua'>minigames = {}
local m = game.ServerStorage.Choices:GetChildren()
for i=1,#m do
table.insert(minig... | 123038 | ||||||||
0 | How do you award a badge if a player owns a different badge? | 91812546 | Killerbot712 | 47 | 2020-08-01 16:44:30 | <p>Hello, I am trying to award a badge to players who own a different badge (so if a player owns a badge in any other game you can award a badge in my game) However, when i join the game i dont get awarded the badge and there is no errors.</p>
<p>Here is my code</p>
<pre class='brush: lua'>local BServ = game:GetService... | 110482 | 1 | 101495 | 0 | 412653139 | Xx_XSanderPlayXx | 107 | 2020-08-01 22:59:22 | <pre class='brush: lua'>local BadgeService = game:GetService("BadgeService")
local Players = game:GetService("Players")
local badgeOwned = 00000000
local badgeAward = 00000000
local function onPlayerAdded(player)
-- Check if player has owned badge
local success, hasBadge = pcall(function()
return BadgeS... |
0 | How can I get the players humanoid? | 37652173 | DeveloperSolo | 370 | 2016-05-14 15:19:03 | <p>I know there's a way with Touched, but how about when you click a GUI?</p>
<p>my attempt:</p>
<pre class='brush: lua'>local plr = game.Players.LocalPlayer -- i know a humanoid isn't in the player from the playergui
game.Workspace.Tutorial.Section1.Screen.CoverScreen.StartFrame.StartGui.
Next.MouseButton1Click:connec... | 30563 | 2 | 33883 | 0 | 68290027 | Warfaresh0t | 414 | 2016-05-14 17:34:15 | <p>All you need to do is get the name of the <strong>LocalPlayer</strong> and you got it.</p>
<p>Add a <em>.Name</em> to your first line of code.
<code>local plr = game.Players.LocalPlayer.Name</code></p>
<p>Then you would just have to edit line 8 of your code.
<code>game.Workspace:FindFirstChild(plr)</code></p>
|
2 | Script Doesnt Change Parents Or Lighting Values? | 1680108820 | JmoneyPlayzOfficial | 49 | 2023-02-22 05:43:09 | <p><em>This is based on my old post, this time I made the code a bit simpler (not really) and tried to explain the problems more clearly, sorry for the inconvenience</em></p>
<p>I'm making a script so that whenever the value changes, it will get the current lighting children and move them back into a folder in Replicat... | 133100 | 1 | 120194 | 1 | 111567127 | Jay123abc2 | 241 | 2023-02-22 10:04:21 | <p>I believe I have spotted the issue.</p>
<p>On line 22 you have <code>setParent(LightingChildren, lobby)</code>
However lobby is set as a table. To set somethings parent it must be an <strong>instance</strong></p>
<p>So you are basically telling the code to get these parts and have the parent a table, which will not ... |
0 | My game having major lag on the server side? | 429417358 | Bankrovers | 11 | 2020-11-22 16:33:00 | <p>Hi, my game has a lot of lag when i'm around 5-10 minutes in the game. It only happens on the server side and not the client. Could anyone help me?</p>
<p>Game link if you need to try the lag:
https://web.roblox.com/games/3178452919</p>
<p>I will appreciate it very much if i could get some help!</p>
<p>First script ... | 116162 | ||||||||
1 | attempt to call a nil value? | 333549003 | aydenwilson819 | 21 | 2022-08-03 20:05:08 | <p>I am making a horizontal tower of hell like bar but when I test it an error pops up saying "attempt to call a nil value". This is the code where the error occurs:</p>
<pre class='brush: lua'>function Update()
for index, Player in next, PlayerLengthData do
local xPosition = Player:GetLengthFromEnd()
... | 131087 | 2 | 118415 | 0 | 929847335 | TheDude646 | 72 | 2022-08-04 05:19:42 | <p><code>Player:GetLengthFromEnd()</code> might not be a valid function, make sure that</p>
<ol>
<li>it's defined before it's called</li>
<li>it returns a value</li>
</ol>
|
0 | Making sure something is 100% streamed in StreamingEnabled? | 1017846707 | Overseer_Prince | 188 | 2023-03-22 05:59:59 | <p>So basically I want to know if theres a 100% way to stream a part onto a client</p>
<p>I ask this because depending on the client some things wont be streamed</p>
<p>and I do know about the fnction StreamAsync where you can stream things</p>
<p>but even that isnt a guarantee that something will be streamed</p>
<p>so... | 133227 | ||||||||
1 | How can I delay my CFrame? | 22745426 | Teeter11 | 281 | 2015-05-08 08:19:53 | <p>This must seem like a weird question, but here it goes.</p>
<p>So in my game, my guns are created by CFraming the head of the player to the players mouse. I then CFrame the gun and arms to the head of the player. What im trying to do is delay the CFrame so i wont get the current Frame's CFrame it will be like the la... | 17357 | 2 | 20811 | 1 | 19566737 | Unclear | 1776 | 2015-05-10 04:25:48 | <p>This is a simple variable manipulation problem!</p>
<p>The idea is to calculate the CFrame for the current frame and store that in a variable. Then, in the next frame you would set the weld's offset to the variable and repeat. This makes sure that you keep your code running alongside the user's framerate.</p>
<p>You... |
0 | what does unable to assign property meshid. Script write access is restricted mean? | 80144491 | turbomegapower12345 | 48 | 2018-09-16 22:44:04 | <p>Hi,
I made a script were when you click E, a lightning bolt appears in front of your character. The lightning bolt is a meshpart, and just recently I added lookVector to it.</p>
<p>But when I tried to summon a lightning bolt this error appeared</p>
<p><em>18:38:26.923 - ContextActionService: Unexpected error while i... | 67516 | ||||||||
3 | What's the difference between FindFirstChild vs FindFirstChildWhichIsA? | 556201097 | YabaDabaD0O | 485 | 2018-06-13 15:22:13 | <p>What's the difference between the two functions: FindFirstChild and FindFirstChildWhichIsA?</p>
| 60262 | 1 | 58645 | 2 | 124281858 | DeceptiveCaster | 3097 | 2018-06-13 15:27:44 | <p>FindFirstChild():</p>
<pre class='brush: lua'>local child = script.Parent:FindFirstChild("Humanoid")
</pre>
<p>FindFirstChildWhichIsA():</p>
<pre class='brush: lua'>local child = script.Parent:FindFirstChildWhichIsA("Humanoid")
</pre>
<p>The difference is that FindFirstChild() looks for an Instance with the given na... |
0 | How can I revert to my original animation? | 13961515 | Sparkflyer34 | 40 | 2017-01-22 06:31:34 | <p>I have a local script in a tool that changes the character's default idle and walking animation, but when I revert back to the original walking animation, it doesn't loop like it's suppose to.
This is the code, The tool.equip is the animation that it changes to, tool.unequip is the original animation.</p>
<pre class... | 39281 | ||||||||
0 | Guis Appear Too Small on Mobile Devices How Can I Fix This? | 114509339 | wafflesforall | 4 | 2021-02-26 02:30:22 | <p>This is probably not the appropriate place to get some help with this issue, but I'm having some issues regarding sizing my GUI buttons. I'm aware of the size numbers being on scale rather than offset; however, my issue is that whenever I test for mobile: the buttons and frames appear <em>too</em> small, ultimately ... | 120694 | ||||||||
0 | How to TweenPosition for GUIs Button/Text inside of BillBoard GUI? | 295750059 | SuperLittleAdmin | 13 | 2020-09-15 10:07:47 | <p>I want to have a button slide down using Tween Position</p>
<pre class='brush: lua'>button.MouseButton1Click:Connect(function()
local b = game.Players.LocalPlayer.Character:WaitForChild("Head").BillboardGui.Button
b:TweenPosition(UDim2.new(0,0,0,0))
end)
</pre>
<p>But the output shows
" - Unable to cast stri... | 113191 | ||||||||
0 | How can I hide / show a Gui from StarterGui with a script? | 414105905 | dylanykenia3 | 21 | 2021-01-02 14:01:55 | <p>How can I hide / show a Gui from StarterGui with a script?
GUI does not show when core value reaches 6000
In my script put error. Here my script.</p>
<pre class='brush: lua'>if workspace.CoreC.Temp.Value ~= 6000 then
game.StarterGui.CoreL.Enabled = true
end
</pre>
| 118055 | 1 | 108027 | 0 | 1488957970 | Radiant_Sparkles | 69 | 2021-01-02 14:18:05 | <p>Not sure if i understand what youre saying, but you can do something like this;
you have a gui in startergui in a screen gui called uwu and inside it is a frame called furry, you get to furry and set visible to false like this;</p>
<pre class='brush: lua'>game.players.localplayer.PlayerGui.uwu.furry.visible = false
... |
2 | How to make an anti-ban script is it possible? | 29026755 | awesomestuff66 | 0 | 2014-03-04 04:00:43 | <p>For script Builder. Fight againset those trolls</p>
| 477 | ||||||||
0 | Why do i keep getting infinite yield, and why does my script search in Playergui? | 849113456 | NICULL897 | 4 | 2021-05-24 15:43:50 | <p>So i made this simple localscript for a chassis, inside its plugins folder</p>
<pre class="brush: lua">local FE = workspace.FilteringEnabled
local F = {}
local DriveSeat = script.Parent.Parent:WaitForChild("DriveSeat")
local car2 = DriveSeat.Parent
if car2.Body.Rogue.Engine.Crash.Disabled == true then
script.Par... | 123734 | ||||||||
2 | Way to delete default sound? Foot steps? | 25842304 | bloxxyz | 274 | 2015-01-26 19:16:06 | <p>I wanted to add my own custom footsteps, I have the script ready, but is there a way to remove default sounds like the foot steps and jumping etc? Both sounds overlap and I don't want that. I know you can remove leaderboards and chat, and I have done that successfully, but is there a line of code that removes sounds... | 14538 | 2 | 17611 | 3 | 32540316 | ultimate055 | 150 | 2015-01-26 20:31:12 | <p>Replace the default ID's with the sound you want.
So for line 3 you could do:</p>
<pre class="brush: lua">rbxasset://sounds/action_footsteps_plastic.mp3"] = "rbxassetid://143959455";
</pre>
<p>You can place this as a normal script in the workspace.</p>
<pre class="brush: lua">local soundIds = {
["rbxasset://soun... |
0 | Why is my DataStore2 not saving or changing values? | 216815068 | ShineBright2775 | 29 | 2020-09-13 17:50:28 | <p>I have this field of view slider that changes the cameras field of view, and I am trying to get it to save the field of view sliders position. It was working fine with normal DataStore but doesn't seem to be working with DataStore2.</p>
<p>I followed this AlvinBlox tutorial <code>https://www.youtube.com/watch?time_c... | 113125 | ||||||||
0 | i want to make this "beam" damage stuff like a HumanoidRootPart of a dummy what do i change? | 1973099835 | G4BR13L_progamer123 | 5 | 2022-12-03 15:42:11 | <p>Here the script the main part is where it damage is tho it doesnt have to damage other players</p>
<pre class='brush: lua'>while true do
local BeamColor = script.Parent.Settings.BeamColor.Value
local InnerBeamColor = script.Parent.Settings.InnerBeamColor.Value
local beamdistance = script.Parent.Settings.... | 132457 | ||||||||
0 | How do I get hand movement in VR to work? | 156248976 | TROBLOXIAN404 | 0 | 2021-04-08 15:24:46 | <p>I'm trying to make a basic Roblox VR game, but I can't get the hands to work. The sensitivity's all off with the object movement. So far, my engine works this way: you can use the joystick to move your character around, which also moves your first-person VR camera around. The camera isn't locked in place with the he... | 122148 | ||||||||
0 | How would I go about fixing Handles movement? | 1451175629 | SuAkihiro | 79 | 2021-04-07 16:49:28 | <p>Hi, I think most acknowledged scripters of this place know about "Handles" instance, right? I've been testing some stuff with it to make movable part in-game (Just like Studio's part movement). And it works, pretty much. I used if face == Enum.NormalId.Back/Front/Etc then method and I thought that it was waaay to lo... | 122122 | ||||||||
0 | XP Difference doesn't update for a TweenSize? | 15438711 | pwx | 1546 | 2018-12-05 00:04:23 | <p>It works for the first level, but the XPDiff doesn't update, even in the loop. So eventually the bar will go over the intended size. Like so: https://gyazo.com/2ef5b5afad60a410f0a47abcd63a671a</p>
<p>Any help?</p>
<pre class='brush: lua'>local starterXP = 1200
while wait() do
local XPDiff = Player.Player... | 71669 | ||||||||
0 | How would I make it so my flashlight tool faces the mouse, without flinging the character? | 490346166 | A_Mp5 | 146 | 2021-02-21 03:02:16 | <p>How would I make it so my flashlight tool faces the mouse, without flinging the character?
I tried using Tweening, Cframe, Orientaion and yet they either don't work or fling the character.
If you're still confused, I wasnt either the hand of the player to face the mouse, without breaking the joints ofc, or the flash... | 120448 | ||||||||
0 | How to script it so it detects the amount of times an animation has played then destroy itself? | 1605120315 | Nuzixa | 4 | 2020-07-29 10:07:17 | <p>Hello guys! I'm new to this website so hopefully I am doing this correctly.</p>
<p>I am trying to figure out to detect when a tool has played its animation multiple times it destroys itself.</p>
<p>I would really appreciate it if someone could help or gives some tips on how to make what I would like to do possible!<... | 110222 | ||||||||
1 | Why Isn't my GUI not spawning parts below the player? | 1961959172 | imnotaguest1121 | 89 | 2021-12-20 20:36:53 | <p>Im making a GUI where If you press It a part will spawn below you but In this situation I want to make a GUI that spawns a part on the tool your holding (The tool I want the part spawn Is a sword name "Part" but It appears to not be working, this Is the code:</p>
<p>local Button = script.Parent</p>
<p>Button.MouseBu... | 128346 | ||||||||
15 | Why is the PlayerMouse not firing KeyDown when F key pressed? | 386992 | BlueTaslem | 18071 | 2014-06-27 17:07:36 | <p>This used to work fine, but last week or so I noticed that the F key control wasn't working in my game.</p>
<p>I just now did a simple test:</p>
<pre class='brush: lua'>function keydown(k)
print(k);
end
m = game.Players.LocalPlayer:GetMouse();
m.KeyDown:connect(keydown)
</pre>
<p>... and "f" wasn't printed when ... | 7271 | ||||||||
1 | I have had some problems with my Script. Can I have some help? | 1041400392 | SecretRelevation | 5 | 2021-04-19 02:28:23 | <p>I'm trying to make a window that will slide down with the command ";CloseWindow" and open with the command ";OpenWindow"</p>
<p>Can someone help??</p>
<p>https://cdn.discordapp.com/attachments/692111214775631872/833527617868005396/unkno
wn.png</p>
<pre class='brush: lua'>local GroupId = 5708827
local MinimumRank = 6... | 122542 | ||||||||
1 | ServerScriptService.Game Logic:15: bad argument #2 (number expected, got table)???? | 53660466 | RealJustFoxin | 2 | 2020-05-14 22:43:49 | <p>For some reason the script:</p>
<pre class='brush: lua'>for i, v in pairs(game.Players:GetPlayers()) do
if not v:FindFirstChild("InMenu") then
table:insert(contestants,v)
</pre>
<p>does not work the word: table is highlighted but the word insert isnt highlighted even though in the tutorial video im watch... | 103133 | 1 | 95224 | 1 | 125718500 | AwesomeHUnderwood | 514 | 2020-05-14 22:47:38 | <p>You're incorrectly indexing the <code>table</code>. The appropriate format is <code>table.insert ( array t, number pos = #t+1, Variant value )</code> not <code>table:insert</code>.</p>
<p>If this helped out, consider accepting this answer. If not, comment below and I'll be sure to help.</p>
|
0 | is it possible to do a number to another number? like from 1 to 5 | 604236298 | tonyruanjunyuan | 55 | 2021-01-12 19:02:25 | <p>I want to make a chance system, I used math.random, however I want it so when it picks the number 10, that player gets a rare item, if it gets 1-9 the player gets a common item, is there a way to do that?</p>
| 118601 | 1 | 108486 | 1 | 271844971 | Dothemariobowp9 | 22 | 2021-01-12 19:15:52 | <p>Try setting a variable to the random, an example:</p>
<pre class='brush: lua'>local chance = math.random(1,10) --Creates a new variable, 'chance', and sets a random number to it between 1 and 10.
print(chance) --Tells you in Output what you got.
if chance == 10 then
--code to give the player a rare item
else
--code ... |
0 | How to make it so that you click a button and it responds to the click? | 2021120416 | projectzrgosbrother | 0 | 2021-01-12 01:17:21 | <p>Hello, I am a very new Roblox scripter and I would like to know how to do this. I've learnt basic things like variables, functions, and arithmetic. If you add the GUI button icon what do you do from there?</p>
| 118572 | ||||||||
1 | in which way can i add this script a debounce? | 205456885 | SuperBeeperman | 30 | 2018-04-23 19:59:13 | <pre class='brush: lua'>local Spirit = script.Parent
Spirit.Touched:connect(function(entity)
if entity.Parent.Name == "FireEssence" and game.Players:FindFirstChild(entity.Parent.Parent.Name)then
local debounce = true
local Man = entity.Parent.Parent.Parent
local RealMan = game.Players:Find... | 57319 | ||||||||
3 | Random.new or math.random, which is superior? | 61716444 | theking48989987 | 2141 | 2018-11-12 03:57:53 | <h2>Which is better for constructing random object from a seed?</h2>
<hr />
<p>Lately, I have seen a brief discussion on the discord server about which is the best random number generator available on roblox. One person advised someone to use <code>math.randomseed(tick())</code> and then do <code>math.random()</code>. ... | 70444 | 1 | 67166 | 2 | 310898243 | EmilyBendsSpace | 1025 | 2018-11-13 07:28:26 | <p>The TLDR is that Random.new() is better, and there is no reason to use math.random() ever, as it has no benefits and a significant drawback if you're trying to do something with a repeatable, deterministic random sequence.</p>
<p>Internally, math.random() <strong>used to</strong> use good old C rand(). Which was not... |
0 | (I am fiukthemetaverse, on a old acc of mine) reddit api help? | 931543609 | TheScaryLogoFan500 | 0 | 2022-09-18 00:35:36 | <p>I was attempting to get a access token which references from this: https://alpscode.com/blog/how-to-use-reddit-api/
How do I make HTTPBasicAuth on lua?
Trying to make the player comment on a reddit post (r/bloxit)</p>
| 131658 | ||||||||
0 | DataStores can only accept valid UTF-8? | 18790861 | woahsnake | 4 | 2021-05-01 10:39:36 | <p>Making a simple datastore but I am running into a simple problem that I cannot figure out right away,</p>
<pre class="brush: lua">local DataStoreService = game:GetService ("DataStoreService")
local playerdata = DataStoreService:GetDataStore ('PlayerData')
game.Players.PlayerAdded:Connect(function(plr)
wait()
... | 122985 | ||||||||
0 | How to destroy my characters Torso? | 49856644 | TookMyTaco | 0 | 2023-01-16 01:32:34 | <p>How do I destroy my characters Torso in a more complicated way? Serious answers please, this is for science.</p>
<pre class="brush: lua">--We begin by declaring a variable to store the character’s torso
local torso = game.Players.LocalPlayer.Character.Torso
--We then define a function which will be responsible for t... | 132860 | ||||||||
0 | Help with GUI messages!? | 30293864 | Leg0brick | 10 | 2014-05-17 23:52:50 | <p>Hello, I'm kinda "noobish" at scripting but could someone help with this script? I want it to make a new text box and GUI that greets the player when they enter the game. When I enter the game no GUI appears.</p>
<p>Thanks for reading, Leg0Brick</p>
<pre class='brush: lua'>function onEnter(player)
repeat wait() ... | 5012 | ||||||||
0 | change speed through gui for a model? | 1212888418 | sheiki01 | 0 | 2022-06-18 14:09:40 | <p>so i am trying to make a horse game, i tried making a gui to change speed for the horse when riding but nothing happened when i pressed it this is the scripts i used</p>
<p>script.Parent.MouseButton1Click:Connect(function()
game.Workspace.base.Humanoid.Walkspeed = 16</p>
<p>end)
for walking gui
and</p>
<p>script.Par... | 130390 | ||||||||
0 | How to remove a string from GetChildren() ? | 473052976 | nkminion | 21 | 2020-04-01 13:27:10 | <pre class='brush: lua'>game:GetService('Teams'):GetChildren()
</pre>
<p>I want to remove a team from this table(I think this is a table) But I don't know how to do so.</p>
<p><strong>Attempt 1 (Using table.remove())</strong></p>
<p><strong>Code :</strong></p>
<pre class='brush: lua'>local team = game:GetService("Teams... | 97759 | 1 | 90315 | 0 | 459692218 | TheMinecraftSmarts | 580 | 2020-04-01 14:39:14 | <p>Sadly, Roblox doens't supply a way to get the index of an item from an array. But you can use this workaround:</p>
<pre class='brush: lua'>local teams = game:GetService("Teams"):GetChildren()
local team = teams.Lobby
for key,value in pairs (teams) do
if team then
table.remove(teams,team)
end
end
</pr... |
3 | Show gui to player not working? | 42416688 | jjwood1600 | 215 | 2015-04-06 22:09:57 | <p>Hi guys
This is meant to show a gui and when the player switches to the green team, but instead it shows it when they join the game and when they change to ANY team.
Any ideas?
Thanks</p>
<p>It is a local script parented to an imagelabel in screengui.</p>
<pre class='brush: lua'>local Frame = script.Parent
local Tea... | 16418 | 1 | 19719 | 6 | 14357591 | Perci1 | 4988 | 2015-04-06 22:34:09 | <p>First it should be said that you have no reason to continuously use <code>script.Parent</code> when you already have a variable for it.</p>
<hr />
<p>Anyways, your problem is line 09.</p>
<p>On line 8, you use a rather clever way to make the frame visible or invisible based on the TeamColor, but then you just go ahe... |
0 | How to change text in gui using a script? | 328413134 | LiLFriks | 35 | 2020-07-31 23:12:34 | <p>Hi! So I have a music playlist, in Workspace, and a GUI with a TextLabel in StarterGUI. In the music playlist script, I added some code attempting to make the TextLabel state what song was playing when it started to play. It worked for the first song, but not any song after. I also noticed that only when using the a... | 110421 | 1 | 101435 | 1 | 357316423 | Tizzel40 | 225 | 2020-07-31 23:39:23 | <p>On line 7 , you had put <code>game.StarterGui</code> . This wont work becuase it is not getting the player's Gui to do anything , its getting the Starter Gui , to do an action , and the starter Gui is there ui that is given to the player when they boot up the game</p>
<p>on line 7 you should The <code>PlayerGui</cod... |
0 | How to make a part show not transparent?? | 845235190 | blue_bunny0fficl | 38 | 2022-09-13 22:11:02 | <p>How will I could turn a part transparent without it going invisible in roblox studio?? Is this possible</p>
| 131614 | 1 | 118861 | 0 | 433962773 | theking66hayday | 119 | 2022-09-13 22:12:44 | <p>It is possible! Simply put a script in a part.</p>
<pre class='brush: lua'>script.Parent.Transparency = 1
</pre>
<p>That should Work!</p>
|
0 | How to get only one player in a GUI and not all? | 1791946066 | PandaKeai | 10 | 2022-06-22 03:42:38 | <p>So I'm having a problem where I want ONLY the person who touched a pad to see a GUI, the problem is that I think the i,v in pairs is taking all players, even despite me using the PlayerGui. How can I get around this? LocalScript:</p>
<pre class='brush: lua'>local debounce = false
local function popup()
if not de... | 130450 | 1 | 117790 | 0 | 295750059 | SuperLittleAdmin | 192 | 2022-06-22 04:32:32 | <p>You can check if the player touching the pad is <code>LocalPlayer</code> (keep in mind that <code>LocalPlayer</code> only exists in local scripts, so don’t attempt this on server scripts).</p>
<p>You should also replace the loop with TweenService, as it is smoother and does not create unnecessary burdens.</p>
<p>Las... |
0 | How do I make my AboutFrame visible when I click the AboutBtn? | 306480974 | iiOnlySavageii | 2 | 2023-02-01 00:37:51 | <p>I used this local script but it hasn't worked. There's no errors in the script analysis + I want to add the AboutFrame is not visible normally. Please don't judge I'm new to scripting.</p>
<p>Here is how my explorer looks</p>
<p>ScreenGui then PlayBtn inside the ScreenGui then the AboutBtn is inside the PlayBtn and ... | 132986 | 2 | 120118 | 0 | 559514967 | T3_MasterGamer | 2189 | 2023-02-03 08:17:52 | <p><strong>EDIT:</strong> To disable every button, you can get every descendant of the player's <a target="_blank" href="https://create.roblox.com/docs/reference/engine/classes/PlayerGui"><code>PlayerGui</code></a> using <a target="_blank" href="https://create.roblox.com/docs/reference/engine/classes/Instance#GetDescen... |
0 | Can someone help me fix this code about cloning a handle for a GUI? | 1112727145 | HugigoRoblox | 4 | 2020-11-22 16:12:47 | <p>Soooooooo
Hi
Yes it's me and I've followed another tutorial from AlvinBlox <a target="_blank" href="https://www.youtube.com/watch?v=WN932TP8GUU"></a>
The script below is supposed to a script that adds an Image of a sword onto a GUI.
For some reason, it doesn't work</p>
<pre class='brush: lua'>-- Core UI localscript
... | 116160 | 1 | 106604 | 0 | 1751062389 | TheEagle722 | 99 | 2020-11-22 17:01:44 | <p>It is a really long script, and its hard to notice every single mistype or so,
try pcalling it, pcalling tests the script if there is a error, and then it prints it to the output, as long as u do it like i did</p>
<pre class='brush: lua'>local x, y = pcall(function()
local availableTools = game.ReplicatedStorage:Wai... |
0 | [STILL NEED HELP]How to make parts unanchor when they touch an explosion? | 83335331 | amuseren | 1 | 2019-01-26 09:17:48 | <p>Hi guys!</p>
<p>I made a part that explodes
This is the script inside that part</p>
<pre class='brush: lua'>wait(3)
local boom = script.Parent
local explosion = Instance.new("Explosion")
explosion.Parent = game.Workspace
explosion.Position = boom.Position
boom:Destroy()
</pre>
<p>Okay so i build this thing: https://... | 75171 | ||||||||
0 | I want to make my hat to rotate to face the right direction when i put it on.? | 60704964 | mooop123 | 0 | 2021-05-02 21:00:43 | <p>Ok so I'm quite new to Roblox studio and I need some help. The main problem I'm having is that when i put on the hat it also turns sideways. Is there a script that could help me change the direction when I put it on?? Any help is appreciated.</p>
| 123041 | ||||||||
1 | Hand always moving In the same direction, and not where the player Is facing (?) | 1961959172 | imnotaguest1121 | 186 | 2022-08-03 03:44:48 | <p>Hello developers!</p>
<p>As the title says, I am making a move for a morph (Which the move Is a tool) that summons a hand that currently does nothing besides moving to where the player Is facing, but on contact, grabs the victim and slams them Into the ground, the problem Is that when using the ability the hand alwa... | 131076 | ||||||||
0 | What is the equivalent of :IsKeyDown for a mouse button? | 92674785 | banane1man | 2 | 2020-08-02 06:44:27 | <p>Im trying to do something that requires me to find out if a mouse key is being pressed</p>
| 110530 | ||||||||
0 | Max character in text box script is not working! Could someone help me? | 324641759 | FireSam5163 | 17 | 2020-07-31 22:49:44 | <p>I made this max characters local script for the textbox, but it won't work. The character counter works, but it doesn't prevent the text from exceeded 42 characters.</p>
<p>Here's the script:</p>
<pre class='brush: lua'>script.Parent:GetPropertyChangedSignal("Text"):Connect(function()
local txt = script.Parent.T... | 110417 | ||||||||
0 | Audio spam plays when being damaged, wondering why (?) | 1961959172 | imnotaguest1121 | 313 | 2022-08-03 23:38:31 | <p>Hello!</p>
<p>I am trying to make a script Inside a NPC that plays a audio of the TF2 nope sound, as well of a dodge animation, the problem Is that when being damaged, It spams the Audio, and also wasting the times you need to hit It before being damaged</p>
<p>Script:</p>
<pre class='brush: lua'>local Troll = scrip... | 131090 | 1 | 118414 | 1 | 953256806 | SEAN_YT213 | 139 | 2022-08-04 02:35:45 | <p>Please use PropertyChangedSignal, the while loop is unnecessary:</p>
<p>Also that's the reason why your audio spams:</p>
<pre class='brush: lua'>Troll:WaitForChild("Humanoid"):GetPropertyChanged("Health"):Connect(function()
-- CODE --
end)
</pre>
|
0 | How would I make a script that places a part at a random location? | 646503461 | ImaginationPAYER | 0 | 2021-06-20 23:52:06 | <p>Hello scripters, I need some help making a script that places a part at a random location on <strong>terrain</strong>. The <strong>terrain</strong> I'm using has hills and mountains in it, so I don't know how to randomly place a part without that part going through the <strong>terrain</strong>. If you could help gui... | 124597 | ||||||||
1 | anyone know how to give a player a tool after choosing a dialogue choice from an NPC? | 332837744 | pinelemongamer | 19 | 2019-08-13 13:31:53 | <p>I want the player to receive a tool after selecting a dialogue choice from an NPC.</p>
| 85674 | 1 | 79495 | 0 | 849928642 | JexaButterscotch | 73 | 2019-08-13 13:44:36 | <p>You could use DialogChoiceSelected, just make a script in the Dialog and add the following.</p>
<pre class='brush: lua'>script.Parent.DialogChoiceSelected:connect(function(player, choice)
if (choice == script.Parent.Choice1) then -- Change the Choice1 to whatever your choice's name is.
local item = game.... |
0 | Moving a Character !Help! | 15436391 | tkddude2 | 75 | 2014-03-02 14:08:20 | <pre class='brush: lua'>wait(5)
local character = script.Parent.Parent.Character
local player = game.Players.LocalPlayer
local cam = game.Workspace.CurrentCamera
local coframe = cam.CoordinateFrame.p
local lvector = game.Workspace.CurrentCamera.CoordinateFrame.lookVector
--local focus = cam.Focus --cant do because it ... | 438 | 1 | 2410 | 0 | 302188 | Dom2d2 | 35 | 2014-04-15 21:03:44 | <p>Your question is somewhat confusing, but I will try to help.
Remember that with Vector3, there must be three numbers.
In this line:</p>
<pre class='brush: lua'>charactercopy:MoveTo(Vector3.new(lvector*20 + coframe))
</pre>
<p>You only good 2 numbers, lvector*20 is one number, and coframe is another number.
You'll ne... |
1 | I cannot figure out how I make this door rotate and position properly with CFrames. Any Help? | 86745980 | Sergiomontani10 | 236 | 2019-11-19 04:39:19 | <p>Basically I want this door to be able to move properly even with different positions and rotations. For some reason it constantly moves in some random ways I never can fix. Here are some images to help anyone willing to help me out figure this out. Thank you for reading all of this and hopefully I can figure it out ... | 90229 | 1 | 83641 | 2 | 18664243 | lazycoolboy500 | 582 | 2019-11-19 05:31:26 | <p>My best recommendation is to follow <a target="_blank" href="https://youtu.be/IYZ7DS_E-VA">this video</a>. It describes everything you need to make your door work!</p>
<p>If you have any questions or issues please contact me. ;)</p>
|
0 | roblox not giving player option to purchase gear when touching brick? | 369829760 | TgaTheGoldenArmour | 15 | 2020-11-08 11:56:56 | <p>Hello, I have made a brick, when a player touches that brick they should be given a option to buy a golden magic carpet. Instead of it saying "would you like to purchase" it just gives a error message when you touch the brick, the code is in a normal script inside the brick. Thanks!</p>
<pre class='brush: lua'>local... | 115501 | 1 | 106093 | 1 | 631603904 | BestCreativeBoy | 1395 | 2020-11-08 12:55:19 | <p>From the video, it look likes you are selling items, made by another user. To fix that,</p>
<ol>
<li>Go to Game Settings in Studio.</li>
<li>Go to Security.</li>
<li>Enabled 'Third-Party' Sales.</li>
</ol>
<p>Lemme know if it helps!</p>
<p>EDIT : You stated that you are encountering an error, related that your playe... |
0 | Minigame script problem. | 8895155 | truefire2 | 75 | 2014-02-19 19:53:20 | <p>Hi. I've created an automated minigames script, which has a few problems. The players respawn in some random place the first time, then die, then spawn at the right place, which is bad, since I want them to be spawned at a spawn location first time round. Also, the timer doesn't work. Also, another glitch is that s... | 107 | ||||||||
1 | How do I change the color of the fog created by ninja blink potion? | 1650537 | pigpoop187 | 10 | 2014-04-16 12:48:53 | <p>local Tool = script.Parent
local vChar = nil
local torso = nil</p>
<p>local maxRange = 100</p>
<p>local lowerBound = nil
local upperBound = nil</p>
<p>local debris = game:GetService("Debris")
local r = game:GetService("RunService")</p>
<p>local blinkSound = Tool.Blink</p>
<p>function onEquipped()
torso = nil
vChar =... | 2138 | ||||||||
0 | Is their any problem with the "nil" in this script? | 56781258 | GoodkidMad | 14 | 2014-05-18 18:58:39 | <p>I am making a create your own admin commands script for a group and I need to know if any errors are noticed in this script. I am asking this because every time I run it the script returns an error at "nil".</p>
<pre class='brush: lua'>--[[
create ur commands list here! :)
example.
kill;
--]]
local msg = Instance.ne... | 5061 | ||||||||
1 | Game lags bad if all players are hiding when monster is released? | 140399066 | Uniplier | 83 | 2023-01-17 18:27:51 | <p>I'm working on a little game where every 60 seconds there's a chance a monster will wake up and teleport to players, instakilling them. The player can avoid this by getting into a locker before he kills them. The problem is, whenever every player is hiding, the loop I use to get all the players executes too many tim... | 132877 | ||||||||
0 | How do I make a gamepass tool giver that doesn't need a server restart to work? | 53574228 | starchip12 | 6 | 2016-10-10 21:17:38 | <p>So I have a segway in Server Storage that I want to do so if you buy it, you just need to rejoin the server to have it. Cause the gamepass script that I have now needs a server restart before it works. The gamepass Id is : <strong>503854648</strong></p>
<p>Thanks!</p>
<p>[UPDATE]
-The script is in Workspace and ther... | 36237 | ||||||||
0 | Not sure what they mean by request, I'm not sure if this is one? | 48995996 | PixelMixer | 15 | 2014-12-01 23:04:45 | <p>I'm sorry if this is a request, but Is this just Q&A, no teaching? What about beginners, people who know nothing about code. What are they supposed to do, what questions are they supposed to ask? How would they even know where to start? Because this is me, and I don't have a question about a specific command or ... | 12937 | 1 | 15975 | 2 | 46382260 | SpazzMan502 | 133 | 2014-12-01 23:12:22 | <p>There are a lot of places to start!</p>
<p>Personally, I started on The beginners tutorial on scripting in the Roblox wiki
Link can be found here</p>
<p><a href="http://wiki.roblox.com/index.php/Absolute_beginner%27s_guide_to_scripting">http://wiki.roblox.com/index.php/Absolute_beginner%27s_guide_to_scripting</a></p... |
0 | GetTouchingParts is not a valid member of Model? | 131131327 | ScrubSadmir | 200 | 2018-09-11 13:36:30 | <p>So I made a script to shoot a fireball, and the parts I want to be touched I want to test to have the touched parts have the same fire ParticleEmitter thats on the fireball. I tried using :GetTouchingParts() and it says "GetTouchingParts is not a valid member of Model" when I try shooting the fireball on a test dumm... | 67245 | ||||||||
1 | How would you increase a stat when a player touches a brick? | 48819875 | spyderwolf | 10 | 2019-02-08 01:07:34 | <p>I've been trying to change the value of a stat "level" when a brick is touched.
I have a LocalScript in the brick with this code:</p>
<pre class='brush: lua'>function OnTouched(Part)
local level
print("Touched")
level.Value = level.Value + 1
end
script.Parent.Touched:Connect(OnTouched)
</pre>
<p>And this... | 75860 | 3 | 71278 | 1 | 128819395 | Gey4Jesus69 | 2704 | 2019-02-08 01:14:23 | <p>The reason this isn't working is because local scripts cannot run in the workspace. They can only run somewhere that is a direct descendant of the player, i.e. <code>StarterPack</code>, <code>StarterGui</code>, or <code>StarterPlayerScripts</code>. The only exception is in the client's character, which is typically ... |
1 | Floating book not orienting properly, anyone know why? | 1533102773 | SYKEYE3T | 9 | 2023-02-25 04:12:22 | <p>To start off I made a floating book which functions like a pet for designs to my game. It works however it doesn't face the right way properly and I don't know why. Here's a video showcasing it: <a target="_blank" href="http://">https://gyazo.com/e28b64b47f20048db9243099ff902aa1</a></p>
<p>CODE:</p>
<pre class='brus... | 133117 | 1 | 120208 | 0 | 559514967 | T3_MasterGamer | 2189 | 2023-02-25 08:15:28 | <p>Maybe the book's <code>LookVector</code> (or <code>-ZVector</code>) is one of the sides. To make it face the right way, you need to make <code>-XVector</code> as new <code>ZVector</code> and <code>ZVector</code> as new <code>XVector</code> using <a target="_blank" href="https://create.roblox.com/docs/reference/engin... |
0 | [STILL UNANSWERED] EXP Debounce is not working, can someone tell me why? | 205456885 | SuperBeeperman | 30 | 2018-04-20 17:43:00 | <p>the thing i need help with is pretty easy, its just how to do so players cant spam the EXP getting, i tried adding debounce but its not working, help?</p>
<pre class='brush: lua'>local debounce = false
local Spirit = script.Parent
Spirit.Touched:connect(function(entity)
if entity.Parent.Name == "WaterEssence" ... | 57130 | ||||||||
1 | How to stop code if IntValue is below a number? | 107860801 | phantomforcesdeath | 9 | 2020-08-22 21:04:53 | <p>I'm VERY new at coding and was trying to make a gun system in roblox. Right now I'm trying to make an ammo system. it works fine and counts down the bullets until 0 at witch point it will keep going into the negatives. I've tried using if statements but no matter where i put it, it doesn't seem to do anything.</p>
<... | 111933 | ||||||||
2 | Function not firing when this part is touched? | 102782207 | JadensLua | 12 | 2020-06-29 19:17:57 | <pre class='brush: lua'>local function onTouch(otherPart)
otherPart.Anchored = true
local Humanoid = otherPart.Parent:FindFirstChild("Humanoid")
if Humanoid then
otherPart.Anchored = false
print("WORK. JUST WORK")
end
end
</pre>
<p>I put this script inside a p... | 107771 | 4 | 99064 | 0 | 56177123 | nikoviking | 231 | 2020-06-29 19:41:55 | <p>Add the following code at the bottom.</p>
<pre class='brush: lua'>script.Parent.Touched:Connect(onTouch(hit))
</pre>
<p>You can replace 'hit' with 'otherPart' or anything else, it's really up to you.</p>
|
0 | How can I get the body parts using :GetChildren()? | 1961959172 | imnotaguest1121 | 186 | 2022-08-06 02:52:08 | <p>Hello!</p>
<p>As the title says, how can I only get the bodyparts using :GetChildren()?</p>
| 131118 | ||||||||
1 | How would I go around making a auto damaging part? | 64408300 | RaverKiller | 668 | 2014-02-27 22:46:20 | <p>For example: I would like to take 5 damage from the Character's Humanoid every 5 seconds if the player is still in 'contact' with the part. How would I go around creating this?</p>
| 337 | ||||||||
1 | Why do my players start sliding around? | 1336886707 | sudachipapa | 5 | 2020-08-02 05:49:46 | <p>Not sure this is my fault or something else, but it's happened a few times that when players join my game, instead of walking with a walking animation, they just start sliding around the map. This was visible to the player themselves and to me as well.</p>
<p>Any ideas on what causes this? Here's a 10 second screen ... | 110527 | ||||||||
1 | How to reference a part using objectvalue in a serverscript? | 43431703 | hellscoutin123 | 2 | 2020-05-11 03:19:36 | <p>This is all in a normal Script, not a local script.</p>
<p><a target="_blank" href="https://gyazo.com/d1f4b91c877134971930dd2ca5f91d21">Screenshot 1</a>
<a target="_blank" href="https://gyazo.com/e17ec56ac6c5c22bfbfd2b6e25b28cb4">Screenshot 2</a>
<a target="_blank" href="https://gyazo.com/3a80ff487f3cfd30936f428cf8d... | 102688 | 2 | 94822 | 0 | 251936426 | youtubemasterWOW | 2717 | 2020-05-11 03:34:52 | <p>Hello. Try using <code>:WaitForChild()</code> on the helicopter. If that doesn't work, make sure that the helicopter value is set, as I saw on your screenshot that it wasn't set. Remember that scripts run instantly and don't wait for something to happen unless you tell it to. Also, try using a <code>repeat wait()</c... |
3 | DataStore request was added to queue. If request queue fills, further Try sending fewer requests?? | 433962773 | theking66hayday | 841 | 2023-01-30 20:10:13 | <p>Hi I keep receiving this error on my House Data Store system:
DataStore request was added to queue. If request queue fills, further requests will be dropped. Try sending fewer requests.Key.
Script:</p>
<pre class="brush: lua">local DataStoreService = game:GetService("DataStoreService")
local MainData = DataStoreServ... | 132977 | 1 | 120094 | 2 | 559514967 | T3_MasterGamer | 2189 | 2023-01-31 00:29:22 | <h2>Solution</h2>
<p>This is where <a target="_blank" href="https://create.roblox.com/docs/reference/engine/classes/DataStoreService#GetRequestBudgetForRequestType"><code>RequestBudget</code></a> comes in. If there isn't enough <a target="_blank" href="https://create.roblox.com/docs/reference/engine/classes/DataStoreSe... |
2 | How to change a variable inside a function to activate a while true do loop? | 53250045 | pilotly | 15 | 2020-07-13 21:22:22 | <p>Hello! I have made few posts on this but here are the basics of this issue I'm trying to learn from.</p>
<p>Basically I'm trying to get a boolean variable to turn true so that a while true loop can activate.</p>
<p>It would help me greatly to tell me what the mistake is so I won't do it again. :)</p>
<p>Trouble code... | 108980 | 2 | 100080 | 0 | 46052 | chess123mate | 5625 | 2020-07-14 00:04:47 | <ul>
<li>You can use BindableEvents to wait until something happens or tables to store information about all players
<ul>
<li>You can learn about tables here: <a href="http://lua-users.org/wiki/TablesTutorial">http://lua-users.org/wiki/TablesTutorial</a></li>
</ul></li>
<li>Functions <em>can</em> be called in if statem... |
0 | How do I make this raycast ignore tools that are being held? | 22303673 | Narroby | 10 | 2015-03-17 21:17:07 | <pre class="brush: lua"> local ray = Ray.new(tool.Handle.CFrame.p, (mouse.Hit.p - tool.Handle.CFrame.p).unit*30)
local hit, position = game.Workspace:FindPartOnRay(ray, user)
local torso = hit and hit.Parent and hit.Parent:FindFirstChild("Torso")
if torso then
torso.CFrame = ... | 15836 | ||||||||
0 | How Do I Make An Animation Play Only For The Local Player? | 1061148582 | YoMrPanda | 4 | 2023-01-17 16:12:59 | <p>Hello. So I want to create a script / local script that when there is a person who joins my game, then there is a model of a bus that plays a little animation. I have already made the animation that I wanted to put on the bus, the bus is called "SchoolBusAmim" and it is placed in the workspace. I want it to be the l... | 132875 | 1 | 120003 | 0 | 87531166 | virushunter9 | 928 | 2023-01-17 18:54:00 | <p>If the bus is the one playing an animation, then all you have to do is use <a target="_blank" href="https://create.roblox.com/docs/reference/engine/classes/Animator#LoadAnimation">AnimationController:LoadAnimation()</a> and <a target="_blank" href="https://create.roblox.com/docs/reference/engine/classes/AnimationTra... |
0 | Why does this script not seem to play the audio when i touch the correct checkpoint? | 483276200 | omgdodogamer | 11 | 2023-03-05 12:44:21 | <p>So I am making an obby where, if i touch a checkpoint that is not the color of my team, it changes my team color to the color of the checkpoint (automatically done by the "AllowTeamColorChangeOnTouch" attribute), it then stops all audios named "Audio" (the names for all the main music for each stage) playing, and pl... | 133145 | 1 | 120232 | 0 | 31504923 | rabbi99 | 714 | 2023-03-05 16:03:29 | <p>There's no such thing as "== not", use "~=" instead.</p>
<p>I haven't fully read your post yet, but this is something I came across.</p>
<pre class='brush: lua'>for _, v in ipairs(workspace:GetDescendants()) do
if v.ClassName == "SpawnLocation" then
v.Touched:Connect(function()
if game.Player... |
0 | Server-side While do counter detects ChildAdded but ignores ChildRemoved? | 125198220 | dank_mayonaise7 | 4 | 2021-04-07 15:24:26 | <p>I made an NPC spawner script that puts a cap on how many zombies can spawn, but I can't figure out how to tell it to spawn more when the cap decreases/a player kills one, it seems to ignore ChildRemoved and stop spawning them even after I cut them from the spawner in Run mode.</p>
<pre class='brush: lua'>local child... | 122119 | 1 | 111259 | 0 | 56177123 | nikoviking | 231 | 2021-04-07 17:53:56 | <p>If you want to spawn a zombie every time one is killed, try the following:</p>
<pre class='brush: lua'>game.Workspace.Spawn.ChildRemoved:Connect(function()
local clone = NPC:clone()
clone.parent = spawner
Clone.Torso.CFrame = Vector3.new(spawner.Position)
ZombieCount += 1
end)
</pre>
<p>Bear in mind ... |
0 | How can I aim BodyVelocity to a point? | 25516360 | Zerio920 | 285 | 2015-05-08 06:32:58 | <p>How can I set an object's bodyvelocity so it moves towards a set point?</p>
<p>So let's say I want a part to move from its spot at (0,0,0) to (10,0,1) with BodyVelocity. I insert it into the part. And the velocity of that part would be ?</p>
| 17356 | 1 | 20747 | 2 | 19566737 | Unclear | 1776 | 2015-05-08 14:06:45 | <p>This is a simple vector problem. Using <a target="_blank" href="http://mathworld.wolfram.com/VectorSubtraction.html">vector subtraction</a>, you can derive the vector pointing from one vector to another vector.</p>
<pre class="brush: lua">pointingVector = endVector - startVector
</pre>
<p>where <code>pointingVector<... |
0 | ?Expected identifier when parsing expression [ | 1080337 | uui | 25 | 2020-09-16 01:36:34 | <p>im making a gui where you can type a brick name, and a text and it displays text on the selected brick using replicated storage.</p>
<pre class='brush: lua'>function click()
local custom = script.Parent.Parent.CustomName.Text
local text = script.Parent.Parent.CustomText.Text
local part = game.Workspace[c... | 113214 | 1 | 103934 | 0 | 468944525 | CreationNation1 | 329 | 2020-09-16 01:46:50 | <p>I'm pretty sure that you aren't supposed to use brackets when also using FindFirstChild because they do basically the same thing.</p>
<p>Try this:</p>
<pre class='brush: lua'>function click()
local custom = script.Parent.Parent.CustomName.Text
local text = script.Parent.Parent.CustomText.Text
local part ... |
1 | Obby skip stage not working? | 113545729 | alexandruboc22 | 12 | 2021-05-03 10:44:48 | <p>Ok,so I finded a script on youtube and I get a error here is the script and the error:</p>
<p>MarketplaceService = Game:GetService("MarketplaceService")</p>
<p>MarketplaceService.ProcessReceipt = function(receiptInfo)
players = game.Players:GetPlayers()</p>
<pre class="brush: lua">currency = "Stage"
done = 0
for i=1... | 123055 | 3 | 112127 | 0 | 94006350 | BulletproofVast | 385 | 2021-05-03 13:43:49 | <p>i would use productfinished</p>
<pre class='brush: lua'>game:GetService'MarketplaceService'.PromptProductPurchaseFinished:Connect(function(userId, productId, didBuy)
-- userId is the players userid (player.UserId)
-- productId is the id of product
-- didBuy is if they bought, canceled, or error (true or false)
i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.