question_score stringclasses 21
values | title stringlengths 6 119 | question_userid stringlengths 4 10 | question_user stringlengths 3 20 | question_user_score stringclasses 496
values | question_datetime stringdate 2014-02-01 23:57:31 2023-04-02 01:40:15 | question stringlengths 0 11k | question_id stringlengths 1 6 | answer_count stringclasses 8
values | answer_id stringlengths 0 6 | answer_score stringclasses 18
values | answer_userid stringclasses 946
values | answer_user stringclasses 963
values | answer_user_score stringclasses 692
values | answer_datetime stringlengths 0 19 | answer stringlengths 0 10.7k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | How to make my gun stop shooting when not holding M1? | 928947129 | Hektorj3 | 3 | 2022-06-22 14:38:02 | <p>I made a script to shoot a gun in a very simple way, being automatic for my M4A1 and a upcoming project however when not holding mouse1 it keeps shooting. Here is my code:</p>
<pre class="brush: lua">local mouse = game.Players.LocalPlayer:GetMouse() -- mouse varible
script.Parent.Activated:Connect(function() --conne... | 130465 | ||||||||
0 | How do I enable/disable something during a certain period of time? | 552192205 | ian091814 | 0 | 2021-06-07 14:38:06 | <p>I want to make a GUI visible in my game, my code is</p>
<p>while wait(0.1) do
if game.Lighting:GetMinutesAfterMidnight() > 8 * 60 then
script.Parent.Visible = true
end
if game.Lighting:GetMinutesAfterMidnight() > 10 * 60 then
script.Parent.Visible = false
end
end</p>
<p>(Sorry for the bad spacing im new to the websi... | 124168 | ||||||||
0 | Why is my billboard gui not being parented to the player? | 201459593 | iiPizzaCraver | 72 | 2022-11-11 20:18:17 | <p>I'm trying to make a script where when the player collects a star it makes a little +1 or -1 effect emit from the player. However, nothing happens when I touch the star and there's no errors which is really odd.</p>
<p>This code is in a server script and is parented to StarterCharacterScripts
The BillboardGuis are p... | 132243 | ||||||||
0 | I'm trying to make a TextLabel that says how high I am, but it doesn't show, how I fix this? | 1265124849 | RektwayYTB | 123 | 2023-01-13 13:37:02 | <p>So I'm making a game where you need to go as high as you can and for some reason the text label (which says how high is my HumanoidRootPart) and it just errors this:</p>
<blockquote>
<p>Players.iMakeGames007.PlayerGui.ForHeight.HeightMeterz.LocalScript:5: attempt to index nil with 'Position'</p>
</blockquote>
<pre c... | 132822 | 1 | 119957 | 1 | 1357830938 | DindinYT37 | 212 | 2023-01-13 13:54:18 | <p>First, using <code>while true do</code> will simply crash your game.
Second, that's, as far as I know, not how a <code>Vector3</code> works. Even if you were trying to get <code>yAxis</code> it should've been <code>hrp.Position.yAxis</code>. You should simply do <code>hrp.Position.Y</code>.</p>
<p>The error you have... |
0 | How would I create a function with an unknown number of arguments? | 1546726 | nate890 | 495 | 2014-02-19 22:13:32 | <p><strong>[This is a mock question]</strong></p>
<p>Sometimes when I code a function I don't know how many arguments are being inputted because the amount of arguments needed for the function are unknown and can be infinite. This causes a lot of problems in my function and forces me to do something like this,</p>
<pre... | 132 | 3 | 256 | 4 | 947798 | MrNicNac | 855 | 2014-02-19 22:19:55 | <p>You're looking for a solution to handling a variable number of arguments. Lua uses three dots (<code>...</code>) to signify an unfixed amount of function parameters. <a target="_blank" href="http://www.lua.org/pil/5.2.html">Source</a></p>
<p><em>There is not an official name for these dots in Lua, as shown in the so... |
0 | How to use a private module? | 36253953 | WorldlyDev | 15 | 2016-05-28 03:18:39 | <p>I understand that you can use private modules to keep your scripts hidden from other Roblox users. I already have a script I want to put in a private module. I just don't understand how to use private modules.</p>
<p>I have looked it up on the internet, on Roblox's Youtube channel, and the wiki yet I cannot find any... | 31021 | 1 | 34273 | 1 | 39250676 | ScriptGuider | 5533 | 2016-05-28 06:27:25 | <p><strong>Introduction</strong></p>
<p>Private modules are created by naming a <code>ModuleScript</code> "<em>MainModule</em>", and uploading it to your user profile. Once the script has been uploaded, the name that it appears under on the site can be called anything.</p>
<p>They're called private modules because you ... |
0 | Can anyone help me with this script that is supposed to print something after all npcs are killed? | 847431372 | Student20986 | 0 | 2022-05-12 12:10:31 | <p>I'm attempting to make a sequence happen after you kill all of the npcs in a game I am making, but I cannot get the script I made to work. When I kill them all it doesn't print "all zombies where killed". There are no errors. Can anyone help?</p>
<pre class='brush: lua'>while true do
wait (1)
if workspace.Zo... | 129975 | ||||||||
0 | How do I change the property of a local player's health? | 20875458 | alex2002ryan | 5 | 2014-04-17 12:45:03 | <p>So say there was a door. The door was like VIP. He didn't have the pass and he would die. How do I do that?</p>
| 2420 | ||||||||
0 | ChildAdded event not firing (reask) | 49776603 | TomsGames | 225 | 2014-03-02 22:55:09 | <p>Here is the whole script:</p>
<pre class="brush: lua">lp = game.Players.LocalPlayer
function onPlayerEntered(newPlayer)
local stats = Instance.new("IntValue", newPlayer)
stats.Name = "leaderstats"
local HighScore = Instance.new("IntValue")
HighScore.Name = "HighScore"
HighScor... | 452 | 1 | 767 | 0 | 644283 | AmericanStripes | 610 | 2014-03-02 22:58:54 | <p>It is because on lines 31 and 24 you do not have ('s or )'s around :IsA().</p>
<p>Read more about the "IsA()" Instance <a target="_blank" href="http://wiki.roblox.com/index.php?title=IsA">here</a></p>
|
0 | Why Won't C to Crouch Work in Server, But it Does in Client? | 1527823663 | kickoff127 | 17 | 2021-07-21 12:50:55 | <p>I was trying to make a game where if you press "C", you will crouch. I have the script, and here it is.(I also put an animation into the local script and put in an animation ID I made)</p>
<pre class='brush: lua'>local UserInputService = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
loc... | 125566 | 2 | 114259 | 0 | 1062119365 | XObbyCreatorX | 38 | 2021-07-21 13:07:10 | <p>Try adding a fireserver function.</p>
<p>Like this :</p>
<pre class='brush: lua'> local UserInputService = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:wait()
local Humanoid = Character:WaitForChild("Humanoid")
... |
0 | Why doesn't my table of click detectors work? | 1284453331 | boijuztgotrecked4 | 7 | 2022-09-05 17:17:34 | <p>Hello. I'm trying to make a script that changes the ClickDetector's mouse icon when the player hovers on a part that can be clicked, and when they stop hovering on it, it changes back to default.</p>
<p>However, it doesn't work with a table, and I have no idea on how to fix it because I don't really use tables that ... | 131522 | 1 | 118800 | 0 | 73170429 | imKirda | 4428 | 2022-09-06 16:02:40 | <p>the correct way is to loop through each click detector in the table, looks like this:</p>
<pre class='brush: lua'>local clickDetectors = {game.Workspace.Part.ClickDetector, game.Workspace.Part2.ClickDetector}
for index, clickDetector in clickDetectors do
print(index, ";", clickDetector)
clickDetector.MouseHo... |
0 | How do I wait until another person join then game starts? | 1722023006 | OhBrotherGaminYT | 11 | 2021-04-19 17:16:03 | <p>I do not know how to do that so I am asking you guys</p>
| 122560 | 3 | 111666 | 0 | 282084648 | CoolBlueJay000 | 48 | 2021-04-19 17:19:24 | <p>This should work, next time before posting please search online. I found it instantly. Thank you :)</p>
<pre class='brush: lua'>local players = game:GetService("Players")
while wait() do -- Maybe don't use wait(), but just an example (https://devforum.roblox.com/t/avoiding-wait-and-why/244015)
if #players:GetPla... |
0 | How would you get the thumbnail of a custom character? | 143096970 | Rayguyban2 | 54 | 2021-02-22 22:46:19 | <p>How would you get a thumbnail such as the one in your profile of a custom character like the character in the game, I have seen Bloxburg doing something similar, I looked up how but it always showed how to get the thumbnail of the players profile not the character in game.</p>
| 120537 | ||||||||
1 | what does (hit) mean? | 22182459 | bradleyawsome | 10 | 2016-02-24 00:18:56 | <p>i was in the wiki and it said this line of code</p>
<pre class='brush: lua'>function(hit)
</pre>
<p>(Started learning scripting a week ago)</p>
<p>what does the (hit) mean i looked it up on the wiki. When they try to explain it the definition it doesn't make sense to me so can anyone tell what does the hit mean exac... | 27798 | ||||||||
0 | Saving And Loading A Grid Placement Systems Assets? | 119011063 | MezzaBlockGuy | 2 | 2018-01-16 08:22:13 | <p><strong>Hey. Ive been wanting to make a grid placement sandbox tycoon, but im not sure how to save models locations in the base. What im mainly unsure of is how to save all the instances positions and load them all in one datastore, would i do it all in one table? how would i know how many objects are being loaded? ... | 52211 | 1 | 51730 | 0 | 16542699 | mattscy | 3725 | 2018-01-16 14:17:47 | <p>You can just iterate through the models in the base and record their name and offset from the baseplate’s position (or some other core part that every tycoon has). Then, you would iterate through the loaded table, create the models and offset them from the baseplate position to return them to the same place. You wou... |
2 | is it possible to make a terrain mini map? | 539909602 | Retallack445 | 75 | 2020-12-06 00:09:23 | <p>i want to know if there is a way to make a Roblox <code>minimap</code> that shows terrain and parts is that possible to do or just an fantasy?</p>
| 116804 | 1 | 107099 | 0 | 60373878 | Ascarson4 | 138 | 2020-12-06 00:21:47 | <p>Yes, there's actually a plugin for that. Here's a link: <a target="_blank" href="http://">devforum.roblox.com/t/release-isometric-minimap-creator/153476</a></p>
|
1 | how do i move the characters "root part"? | 391170608 | superspeedr1234 | 60 | 2020-09-16 00:18:52 | <p>i have a script here:</p>
<pre class='brush: lua'>game.Players.PlayerAdded:Connect(function(player)
local user = player.Character
player.Chatted:Connect(function(msg)
if msg == "code:123!x556" then
user.HumanoidRootPart.Position = Vector3.new(0,0,0)
end
end)
end)
</pre>
<p>and... | 113208 | ||||||||
0 | Could you help with Event:FireAllClients? | 536049572 | NiroTurtle | 83 | 2020-01-17 01:54:34 | <p>So I have a script that when everyone on a certain team dies, the script loads everyone's character. I decided to make it so when they all die, a GUI pops up saying that the bad dude won. But the GUI doesn't pop up, and there's no error message. Could you please see what's wrong with the script? Any help is apprecia... | 93131 | ||||||||
0 | [SOLVED] Check for a Sky? | 16581981 | sgsharp | 265 | 2014-04-13 05:20:51 | <p>I am currently in the process of creating a plugin. The purpose of that plugin is to allow the user to choose sky boxes freely.</p>
<p>I want my plugin to check "Lighting" to see if there is already an item that is a "Sky"</p>
<p>If there isn't already a sky in Lighting, I will add one.</p>
<p>Here's what I have...<... | 1271 | 1 | 1721 | 1 | 10646297 | samfun123 | 235 | 2014-04-13 05:28:36 | <p>found = false
for _,v in pairs(game:GetService("Lighting"):GetChildren()) do
if v:IsA("Sky") then
found = true
end
end</p>
<p>Found is going to be whether or not a "Sky" is in Lighting</p>
|
2 | Identifying First Person? | 56513701 | HMNapoleon | 35 | 2016-02-12 15:52:58 | <p>I'm wanting to do something once a player zoom in (to the max)
for example, the player zoomned in to first person and it will print 'hi' ONCE.
and if he zoom out nothing will change until he zoom in back again.</p>
| 27311 | ||||||||
0 | How to fire a certain function whenever you arrive to your destination with pathfindingservice? | 181386826 | Derzett | 51 | 2019-10-21 16:31:13 | <p>Hello, so i want a GUI to activate whenever i arrive at a certain point i selected with pathfindingservice but i couldn't find an event to fire whenever that happened. For example something like pathfindingservice.Finished:Connect(function(). Thanks!</p>
| 89050 | 1 | 82500 | 1 | 50163782 | n7e | 5093 | 2019-10-21 17:01:39 | <p>What you're trying to do is described <a target="_blank" href="https://developer.roblox.com/en-us/articles/Pathfinding">here</a>.</p>
<p>I'm not going to post the script here, because it's a bit long, but how it works is computes a path for a player/npc to follow in order to reach a certain destination.</p>
<p>Visua... |
1 | Accessory remover not working? | 130021889 | SpeedyTV_1 | 76 | 2020-11-21 17:38:19 | <p>So basicaly I made an accessory remover that removes your accessories once your character has been added to the game so it removes even after respawn. It should remove only if you are NOT on one specific team but it doesn't work and I don't know why.</p>
<pre class='brush: lua'>game:GetService("Players").PlayerAdded... | 116110 | 1 | 106567 | 1 | 468944525 | CreationNation1 | 389 | 2020-11-21 19:34:33 | <p>It is possible that when the character is added, not all the accessories have been loaded. You can fix that by simply doing:</p>
<pre class='brush: lua'>game:GetService("Players").PlayerAdded:Connect(function(plr)
plr.CharacterAppearanceLoaded:Connect(function(char)
if plr.TeamColor ~= BrickColor.new("Wh... |
3 | How do I use function(hit) as a different hit function? | 232623022 | 2_MMZ | 1059 | 2021-03-05 00:03:20 | <p>Hi, so, I'm making a game where if you touch a part, a GUI becomes visible. I get an error that says <code>FireClient: player argument must be a Player object</code> Could I possibly get some help? Any answer that works will do. It's a workspace script inside of the part. Also, if you were wondering, I have the GUI ... | 120961 | 2 | 110228 | 1 | 128325709 | 0hsa | 193 | 2021-03-05 00:13:28 | <p>the hit isnt the player, its the object that touched it; use this</p>
<pre class='brush: lua'>local remEvent = game.ReplicatedStorage:WaitForChild("RemoteEvent3")
local debounce = false
script.Parent.Touched:Connect(function(hit)
local player = game.Players:getPlayerFromCharacter(hit.Parent)
if player then
... |
0 | I am trying to make a value constantly update but it wont work, How can I do it? | 20150684 | FlankWolffe | 0 | 2017-10-25 01:24:30 | <p>Here is my script, Please help me!</p>
<pre class='brush: lua'>--Variables
local plr = game.Players.LocalPlayer
local cash = script.Parent.Cash.Value
local show = script.Parent
--Script
while (1) do
show.Text = cash
print(cash)
wait(0.1)
end
</pre>
| 48877 | 4 | 49053 | 0 | 137965063 | H4X0MSYT | 536 | 2017-10-25 06:27:36 | <p>Actually, this script works fine. May not be the most efficient, but let's be honest, we all did that once. Although the **while wait(1)* and then the <em>wait(0.1)</em> seems a bit odd. <em>while wait(1.1)</em> will do the same. New thought: Did you make sure the script is inside a label or textbox?</p>
|
0 | ROBLOX Broke my script, can someone fix it? | 25240799 | BearKranz | 41 | 2014-05-04 13:00:36 | <p>bin = script.Parent</p>
<p>function onButton1Down(mouse)</p>
<pre class="brush: lua">local model = bin.model:clone()
model.Parent = game.Workspace
model:MakeJoints()
model:MoveTo(mouse.hit.p)
</pre>
<p>script.Parent:Remove()</p>
<p>end</p>
<p>function onSelected(mouse)
mouse.Icon = "rbxasset://textures\GunCursor... | 4311 | 2 | 5864 | 0 | 1449757 | ZarsBranchkin | 885 | 2014-05-04 13:15:30 | <p>Let's see..</p>
<pre class="brush: lua">wait(0.1)
bin = script.Parent
function onButton1Down(mouse)
local model = bin.model:clone()
model.Parent = game.Workspace
model:MakeJoints()
model:MoveTo(mouse.Hit.p)
script.Parent:Destroy()
end
function onSelected(mouse)
mouse.Icon = "rbxasset://textur... |
0 | Can't get Humanoid:Touched to work for npc to player contact? | 30602149 | cyanslime123 | 23 | 2020-02-17 19:12:32 | <p>The script below is a child of an npc. Basically I wanted to make it so that when the npc is touched by a player that it will stop moving to random parts. But when I found out that my script didn't work I just wanted to check if the npc would detected being touched in general and that didn't even go through.</p>
<pr... | 94742 | 1 | 87484 | 0 | 36051587 | megukoo | 877 | 2020-02-17 19:17:37 | <p>Remember that when using a loop, the loop will yield the current thread until it either <strong>finishes</strong> or <strong>it's condition is no longer met.</strong></p>
<p>You can notice this here, as the code below will not run due to an infinite loop:</p>
<pre class='brush: lua'>while true do
print("i am inf... |
0 | How to pick a team color? | 15619704 | NinjoOnline | 1147 | 2014-04-26 09:29:38 | <pre class='brush: lua'>players = game.Players:GetChildren()
randomp = players[math.random(#players)]
print(randomp.Name .. " is killer")
game.Player.TeamColor = BrickColor.new("Bright red")
for i,v in pairs(players) do
if v.Name ~= randomp.Name then
print(v.Name .. " is runner")
... | 3571 | 1 | 4972 | 0 | 3289648 | YaYaBinks3 | 110 | 2014-04-26 09:58:13 | <p>Why can't it kill them? There is a method called <code>:LoadCharacter()</code> which instantly respawns them.</p>
<pre class='brush: lua'>players = game.Players:GetChildren()
local randomp = players[math.random(1,#players)]
print(randomp.Name .. " is killer")
randomp.TeamColor = BrickColor.new("Bright re... |
0 | How can I make a model loop a animation? | 57463457 | iQuestionU | 10 | 2014-04-15 04:33:01 | <p>Like, a model (I'll name it 'Person') that's basically a normal ROBLOX, but in this case I want it to loop an animation, so people can see it's animation be done non-stop. Sort've like a gallery; putting the animation on display.</p>
| 1515 | ||||||||
4 | elseif problem i would like some help please? Your title should be specific? | 566296650 | raid6n | 2309 | 2019-09-23 00:11:03 | <p>First, I typed in a local script into a text button.</p>
<p>Here's the script:</p>
<pre class='brush: lua'>LocalPlayer = game.Players.LocalPlayer
tableLots = script.Parent.Parent.Parent.TableLots
script.Parent.MouseButton1Click:connect(function()
local text = script.Parent.Parent.TableHandler.Text
local numb... | 87818 | 2 | 81414 | 1 | 50163782 | n7e | 5118 | 2019-09-23 01:03:12 | <p>chosenTable was out of scope (meaning the variable doesn't exist in the current context.)</p>
<p>Looking at the rest of your code, it seems like you're trying to alert the player that a table is taken.</p>
<p>If you were to put the code in an elseif, it would only run the code when the table number is either less th... |
0 | How to make a CFrame Roller Coaster? | 80073497 | JDCustard | 0 | 2018-07-01 22:40:59 | <p>I would like to make a coaster follow a path of bricks using the position and rotation of the part and cframing the train along the path.</p>
<p>See Image below:
http://i.prntscr.com/132lorrkS2Ko-c0r20eRZA.png</p>
<p>I have this code which allows it to be cframed around the track facing foward but it ends up deraili... | 61618 | ||||||||
0 | Put this in a local script wont work no output what's problem? | 18369403 | Lem0nzz | 5 | 2014-04-16 13:18:17 | <p>Help me please, this script's supposed to change a sword's mesh TextureID, when you type a ID from the catalog, into the TextBox. But the thing is, when I type it in, it wont work, I tried both local, and non local scripts, and yet it still wont work, I put it into the mesh, so that's it's parent, yet I made the pat... | 2144 | 1 | 2855 | 1 | 3110492 | Bebee2 | 195 | 2014-04-16 13:23:04 | <p>On line 5 is that StarterGui the name of the ScreenGui?</p>
<pre class='brush: lua'>local GuiBar = player.PlayerGui.StarterGui.Frame.TextBox -- If this isn't the right way to find the path, someone fix it please.
</pre>
<p>On line 11, remove that random \</p>
<pre class='brush: lua'>swordMesh.TextureId = "http://www... |
0 | How to do client-server communication and replication? | 1672327769 | GulgPlayer | 17 | 2022-11-17 18:10:50 | <p>Hello!</p>
<p>I'm trying to make a free to use engine which may help developers to simplify Roblox modules and scripts creation which is named RoApp.</p>
<p>I want to developers import RoApp, and used it just like this:</p>
<pre class="brush: lua">local app = RoApp.new("AppName", RoApp.Module)
function app.InitClien... | 132302 | 2 | 119496 | 1 | 123585026 | NykoVania | 231 | 2022-11-17 20:31:58 | <p>Try making it a ModuleScript so that both the server and client can access it</p>
|
1 | Plugin GUI help? | 33167175 | 1N0body | 206 | 2014-06-25 19:41:43 | <p>How I am able to do a G.U.I. for my plugin which is active in the studio? Like example the animation editor from <em>ROBLOX</em> , a G.U.I appears where I can click the button and gives me the next frame. How I am supposed to do something like that? I searched evrywhere (including the wiki) but I didn't found it.
We... | 7199 | 3 | 35173 | 4 | 44575199 | tanoflame | 22 | 2016-06-23 16:14:56 | <p>This is two years late but you would parent the GUI to the CoreGui so something like this</p>
<pre class='brush: lua'>Gui.Parent = game.CoreGui
</pre>
<p>And to remove it you would just have to do set the Gui to a Variable</p>
<pre class='brush: lua'>local Gui = script.Gui -- or wherever you put it
Gui.Parent = game... |
0 | [solved] Why wont my script teleport players? | 162547151 | Robert123456789l | 2 | 2022-05-21 09:02:21 | <p>So I made a simple script to teleport all players to one point after a function is called, but for some reason It does not teleport anyone. I didnt get any error in output and yes, I am sure the function runs properly. Here is the script I am using:</p>
<pre class="brush: lua">local proximity = script.Parent
local p... | 130062 | ||||||||
1 | Why doesn't my condition for my if statement and repeat loop work? | 38036947 | marioblast1244 | 113 | 2017-05-23 02:24:50 | <p>I'm trying to make it so the player would gain 1 money every second, but its not looping correctly. This is what I'm using:</p>
<pre class='brush: lua'>local leaderstats = game.Players.LocalPlayer:WaitForChild("leaderstats")
local money = leaderstats.Money
money.Value.Changed:connect(function()
if money.Value &l... | 43162 | ||||||||
1 | How do I make a sphere spin forever? | 42606324 | Hirokai | 10 | 2014-04-16 12:35:23 | <p>I've tried scripting of how to make a <em>spinning sphere</em> do a <strong>forever loop</strong>, but there's always something wrong, not sure why. <em>Any help?</em></p>
| 2133 | 3 | 2868 | 0 | 7279390 | crabbydarth2122 | 20 | 2014-04-16 14:02:42 | <p>Here's a simple and easy-to understand one:</p>
<pre class='brush: lua'>sphere = script.Parent --This means that you have to have the script in the sphere part
a = 0
repeat
sphere.Rotation = Vector3.new( 0, a, 0) --The second value of vector3 is a,
wait(.01) -- we wait .01 seconds,
a = a+... |
2 | Disabling space key? | 101442767 | RepeatLua | 90 | 2015-12-13 20:23:43 | <p>I can't figure out how to disable the space key. I need this because I'm making a racing game where I don't want players to jump out of the cars. Why isn't this working, and what can I do to make it work?</p>
<p>This is what I've tried:</p>
<pre class='brush: lua'>Instance.new("HumanoidController", game:GetService("... | 25195 | 1 | 28754 | 4 | 29413559 | alphawolvess | 1784 | 2015-12-13 20:31:29 | <p>This is a great way to use ROBLOX's new update on JumpPower for Humanoids! I've tested this and it appears to work!</p>
<p>This line of code would be a basic Idea, but it would remove the ability of jumping forever, so if you ever want them to jump, you must make some adjustments!</p>
<pre class='brush: lua'>--local... |
1 | how do i get the player walk to mouse position? | 702213653 | Grazer022 | 128 | 2020-06-18 04:06:55 | <p>what i need is when the mouse is in a position, the player would go to the mouse’s position. The camera is above the player’s head though, which means the player should only move onto either X or Z axis and not Y because the would go upwards. How do i do this? I’m sorry if this is a lot. Thanks!</p>
| 106698 | 3 | 98239 | 1 | 31504923 | rabbi99 | 714 | 2020-06-18 14:40:45 | <p>First you'd need the mouse's position on the workspace. We also need the Character of this player to get to the <strong>Humanoid</strong>. The <strong>Humanoid</strong> holds the property <strong>WalkToPoint</strong>. This will be useful for the script that will manage this system you want. To get this information t... |
0 | Why aren't the hats that i load from a humanoid description aligned properly? | 1332969660 | if3q | 6 | 2021-06-22 22:36:44 | <p>I am using this code to assign the character data from an avatar to a dummy character:</p>
<pre class='brush: lua'>local id = 2501468839
local dummy = workspace.Dummy
local newHumanoidDescription = game.Players:GetHumanoidDescriptionFromUserId(id)
dummy.Humanoid:ApplyDescription(newHumanoidDescription)
</pre>
<p>The... | 124646 | ||||||||
0 | is there any way to convert mesh part to basepart? | 1175688782 | typhoon1421 | 22 | 2020-06-11 15:47:50 | <p>is there a way from which i can convet my mesh into a base part i need it for my game.</p>
| 106097 | 1 | 97712 | 0 | 280360804 | sebanuevo | 123 | 2020-06-11 16:17:46 | <p>First, this is not a scripting question. Second, i think u can't convert your mesh into a base part.</p>
|
0 | How can I disable Swimming on NPC's? | 67484847 | DemonsEmperor | 11 | 2020-09-15 17:29:29 | <p>So here is my script.
ServerScript located into the NPC.
The NPC takes a nose dive into water as he should based on standard roblox physics, I'm looking for him to float across the top, or at least not nose dive. I would create an animation if needed, I just was hoping to simply insert this script into future NPCs t... | 113198 | ||||||||
1 | A script that removes a tool on touch of a part | 6030494 | Exsius | 162 | 2014-03-01 19:04:44 | <p>I tried doing</p>
<pre class="brush: lua">script.Parent.Touched:connect(function(hit)
if hit.Parent:findFirstChild("Humanoid") then
game.Players[hit].Backpack.Key:Destroy()
end
end)
</pre>
<p>but it didn't work and I used the same name "Key for the tool" any help will be truly appreciated</p>
<p>Thanks,</p>
<p>Exsiu... | 399 | ||||||||
1 | A gun I rescripted because bodythrust Is deprecated won't work? | 1961959172 | imnotaguest1121 | 362 | 2022-03-03 16:06:08 | <p>So recently BodyThrust Is deprecated thus forcing me to use VectorForce, which Is actually easy to control than BodyThrust (To read about VectorForce use on this link: https://developer.roblox.com/en-us/api-reference/class/VectorForce). So anyways I decied to re-script It so It has VectorForce. The way I do It Is to... | 129184 | ||||||||
0 | How to create spells using module scripts? | 364796628 | Funnyskyswagway3 | 30 | 2022-07-09 23:57:38 | <p>What I’m trying to achieve here is the usage of spells through module scripts. What my problem is I don’t know how to make it so if you say the spell “Incendia” it does what’s in the module script (Second Code) I’ve just started to learn about module scripts so I'm stuck on this. If you need more clarification I wil... | 130719 | ||||||||
0 | How to auto scroll a ScrollingFrame? | 78598789 | Skeletonarcher12 | 17 | 2016-12-28 08:17:33 | <p>I am trying to make a ScrollingFrame in which as more frames appear it scrolls down so you can see the latest one, however I am unable to find a way of doing this.</p>
| 38458 | 1 | 40811 | 0 | 8310972 | RubenKan | 3615 | 2016-12-28 09:36:57 | <p>Scrolling frames have the property "CanvasPosition", set this value to make the scrolling frame scroll (No smooth animation automaticly).</p>
<p>An auto-scroller could look like this:</p>
<pre class='brush: lua'>--Localscript inside ScrollingFrame
for i=1,300 do
script.Parent.CanvasPosition = Vector2.new(0,i)
... |
2 | How to prevent a player from using Shift Lock on PC/Mac? | 124281858 | DeceptiveCaster | 3043 | 2018-09-21 14:26:05 | <p>Shift Lock is a setting available for PC and Mac <em>only.</em> Shift Lock is basically a cheaper way of using 1st Person Mode, as the player is locked in the position their mouse is facing. Now, I've tried a couple scripts to prevent the player from using Shift Lock (but not 1st Person) and none of them work. If so... | 67690 | 1 | 64989 | 5 | 2390780 | format | 55 | 2018-09-21 14:50:26 | <p>Open <strong>explorer</strong> and <strong>properties</strong>, scroll down in <strong>Explorer</strong> till you see <strong>StarterPlayer</strong>.</p>
<p>Click on <strong>StarterPlayer</strong> and then untick <strong>EnableMouseLockOption</strong> in properties.</p>
|
0 | Grip Editor Doesn't Function? | 60473307 | KAAK82 | 16 | 2014-06-04 13:39:48 | <pre class='brush: lua'>local Plugin = PluginManager():CreatePlugin()
local Toolbar = Plugin:CreateToolbar("Plugins")
local ActivateButton = Toolbar:CreateButton("", "Tool Grip Editor", "wrench_hold.png")
local Mouse = Plugin:GetMouse()
local TRANSPARENCY = 0
local function Create(ty)
return function(data)
... | 6156 | ||||||||
0 | How chat no respond back to whitelisted? | 331809274 | TechModel | 100 | 2022-05-09 06:34:40 | <p>How come this does not try to respond back when the whitelist 12345 for example id say "hey" in the roblox chat default, and everyone respond back. But chat function :Chat() not doing anything. Needs to be different like fire event or something?</p>
<pre class='brush: lua'>game.Players.PlayerAdded:Connect(function(p... | 129966 | ||||||||
0 | Why DataStore Problem? | 6505890 | peoplemove12 | 148 | 2014-06-01 02:09:27 | <p><strong>Anyone know the problem. People keep <em>answering</em> with an invalid <em>format</em>.</strong></p>
<pre class='brush: lua'>Game.Players.PlayerRemoving:connect(function(Player1)
local key = "user_" .. Player1.userId
Game:GetService("DataStoreService"):GetDataStore("Stats"):UpdateAsync(key, function(oldValu... | 5964 | ||||||||
1 | Why don't some keys work with Mouse.KeyDown? | 849264 | blocco | 185 | 2014-02-17 01:13:14 | <p>I don't like the ROBLOX backpack, and I disabled it so that I could make my own. However, I've run into a problem. I can't open my inventory! The <code>i</code> key isn't working! Is there anything I can do to get it to work?</p>
| 17 | 4 | 32 | 6 | 947798 | MrNicNac | 855 | 2014-02-17 01:17:41 | <p>Some keys in KeyDown (i, o) are reserved for other things by a binding. Use KeyUp instead, and you should be able to get the input from those reserved keys.</p>
|
0 | Making a Flashlight on a Gun | 2669002 | Corogl | 0 | 2014-03-04 17:48:03 | <p>Hey guys, I was wondering how do you make it so a certain light on a gun (script.Parent.Light.Light1) is enabled when you hit f, and disabled when you hit it again?</p>
<p>Also is it easy to just copy it if I wanted to make 2 lights in a gun?</p>
| 485 | ||||||||
0 | How do I pass name of part that killed player trought events? | 1025739114 | kubapro213748 | 8 | 2022-09-20 18:20:52 | <p>I have event called "PlayerDiedTo" that is supposted to pass names of things that killed the player to local script so it can check if the thing that killed player was named "CorrectPart"</p>
<p>I tried this but I just started learning about events and dont know how this works</p>
<p>local</p>
<pre class='brush: lua... | 131682 | ||||||||
0 | [SOVLED!!] Script Taking double the cash it needs to? | 247991239 | KixWater | 111 | 2021-02-26 00:09:40 | <p>Hello, so I am currently trying to code a script where when a player presses a button, then it will fire a remote event to the server and check if the player has enough money, if they have the item, and if they have a bool value in a folder that I made. The problem is that when the player presses the button, it take... | 120687 | ||||||||
0 | i have a problem with my verify script? | 1249649431 | guardian_stone | 12 | 2023-03-18 23:31:48 | <p>so basically im trying to do that when you click a button and the text in a textbox says 13 then something appears</p>
<p>script:</p>
<pre class="brush: lua">script.Parent.MouseButton1Down:Connect(function()
if script.Parent.Parent.TextBox.Text = "13" then
game.Workspace.Maxwellforbooks.maxwell.Transpare... | 133212 | ||||||||
1 | Attempt to index nil with 'leaderstats'? | 1251627904 | CodeWon | 121 | 2021-04-03 16:06:51 | <p>I was trying to make it so you can sell your gems for 5 coins each, and I got an error. The leaderstats work perfectly fine as well.</p>
<pre class='brush: lua'>script.Parent.MouseButton1Click:Connect(function(player)
player.leaderstats.Coins.Value = player.leaderstats.Gems.Value * 5
player.leaderstats.Gems.... | 121969 | 3 | 111099 | 2 | 226832508 | MattVSNNL | 187 | 2021-04-03 18:23:50 | <p>Also if you only sell with a local script it won't permanently change since its only local there a big difference between local and server, It works with filtering enabled, Basically if you don't know what a remote event does, You use a remote event for filtering enabled, For example, you want to add leader stats to... |
0 | how to use variable with space? | 306080525 | skeletonpiratejack | 13 | 2021-02-01 00:55:57 | <p>i am trying to make a planet name generator so heres the code:</p>
<pre class='brush: lua'>local PlanetNameHolder = script.Parent
local NameGenerate = math.random(1,3)
local SurnameGenerate = math.random(1,3)
if NameGenerate == 1
then local Name = "LOL"
elseif NameGenerate == 2
then local Name = "Bad"
elseif NameGen... | 119472 | 2 | 109061 | 0 | 160399649 | genilsonotavio | 132 | 2021-02-01 01:00:41 | <p>Try to concatenate the two variables.</p>
<pre class='brush: lua'>PlanetNameHolder.Name = (Name.. " ".. Surname)
</pre>
<p>Or.</p>
<pre class='brush: lua'>PlanetNameHolder.Name = tostring(Name.. " ".. Surname)
</pre>
|
0 | The roblox animation I made does not run in the Studio or in game, why? | 1522202318 | NathanBlox_Studios | 212 | 2020-07-25 13:29:55 | <p>I have made a tool with a localscript and an animation in it, that when the tool is activated it should fire a remote event, increase their strength by one and play an animation.</p>
<p>Tool localscript:</p>
<pre class='brush: lua'>local anim = script.Animation
local char = game.Player.LocalPlayer.Character:Wait()
s... | 109927 | ||||||||
1 | What does for i,v in NEXT do? And what can it be used for | 174610307 | goodadmins | 111 | 2019-07-07 21:09:33 | <p>I never understood</p>
<pre class="brush: lua">for i, v in next(Table) do
print(v)
end
</pre>
| 83187 | ||||||||
0 | Why will not FireAllClients() work? | 90260071 | NinjaXDpro | 22 | 2019-01-01 15:36:04 | <p>I am trying to tween a Frame's position for everyone.</p>
<p>Here is the local script in the client</p>
<p>`local repStore = game:GetService("ReplicatedStorage")
local remote = repStore:WaitForChild("cool")
f = game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame</p>
<p>remote.OnClientEvent:connect(function()
f:TweenP... | 73503 | ||||||||
0 | How do I change text for all players via a LocalScript by using a RemoteEvent? | 84507780 | FrancisRUnderwood | 0 | 2021-02-23 14:52:23 | <p>I have a text box inside the player's StarterGui and a LocalScript inside it with the following contents:</p>
<pre class='brush: lua'>local textHeader = workspace.Screen.SurfaceGui.Frame.header
local textHeader2 = workspace.Screen2.SurfaceGui.Frame.header
script.Parent.FocusLost:connect(
function(enterPressed)
... | 120562 | ||||||||
0 | How do I Open .rbxmx Files in Studio? | 461604490 | 2Loos | 145 | 2020-11-05 02:10:11 | <p><em>This question is not about scripting</em></p>
<p>Ah yes, the epic problem of unions getting corrupted after over 7 hours of hard work! I followed the amazingly detailed DevForum post on how to retrieve it and then, boom! There's that one step that always makes no sense!!! Please, someone, help me, I've worked qu... | 115361 | ||||||||
1 | Why are these values not changing? | 104801865 | yasquerda | 32 | 2022-09-14 02:22:53 | <p>I'm trying to update values but the values don't change when the event is fired</p>
<p>In a server script</p>
<pre class='brush: lua'>rep = game:GetService("ReplicatedStorage")
event = rep.Events.PlayerRebirth
function onRebirth(player)
local rebirths = player.leaderstats.Rebirths.Value
local speed = player.... | 131616 | 1 | 118864 | 2 | 559514967 | T3_MasterGamer | 845 | 2022-09-14 09:41:22 | <p>You set them as a variable, and when it becomes a variable, only the numerical value of the IntValue will only change, not the IntValue itself. So instead, use <code>IntValue.Value = int</code>.</p>
<pre class='brush: lua'>rep = game:GetService("ReplicatedStorage")
event = rep.Events.PlayerRebirth
function onRebirth... |
0 | [NOT SOLVED] Why my camera system works in Studio but not in Online mode? | 5520567 | lucas200206 | 90 | 2015-03-09 13:28:04 | <p>Okay, last days I've been experimenting with camera manipulation and so, I've successfully developed a GUI in where when you press the TextButton with a name, the LocalScript will search in ReplicatedStorage for a folder named Cameras, in which, it should have a Camera with the same name of the TextButton. And then,... | 15629 | ||||||||
0 | What is a debounce? | 46332524 | Grenaderade | 525 | 2015-04-03 23:41:49 | <p>I've been wondering, what is debounce?</p>
| 16316 | 2 | 19583 | 4 | 17514438 | TheeDeathCaster | 2368 | 2015-04-04 01:27:10 | <p>That Question has been Answered by the ROBLOX Wiki.
<a target="_blank" href="http://wiki.roblox.com/index.php?title=Debounce">Debounce</a> is something that prevents a function from firing multiple times on execution basically.</p>
<p>I have posted my Comment as an Answer because I was asked to do so, however, I fai... |
1 | How do I change the ClickDetector Cursor/Icon? | 73453458 | par1d | 19 | 2019-08-10 11:45:23 | <p>Is there anyway to change the ClickDetector cursor/icon?</p>
| 85468 | ||||||||
1 | How to find which script remote event was fired from? | 403434932 | 1blaisinraisin08 | 14 | 2022-09-18 21:18:51 | <p>I really don't want to make a bunch of remote events. How would I make the script know where which script fired it?</p>
| 131665 | ||||||||
0 | How can I make two sets of teams (red and blue, black and white)? | 61930602 | ChirpPerson | 21 | 2020-09-15 23:40:43 | <p>For example, there are two sets of teams: set 1; red and blue, and set 2; black and white. A player can be <em>red and white</em>, <em>red and black</em>, <em>blue and white</em>, <em>blue and black</em>, but never <em>white and black</em> or <em>red and blue</em> because those teams are of the same team set. Would ... | 113207 | ||||||||
0 | How to remove a players friction? | 1652376536 | valk_3D | 140 | 2021-02-25 01:25:43 | <p>So I created a script that lets you "dash" around the map. (you can use it if you want I'm cool with it)</p>
<pre class="brush: lua">local uis = game:GetService("UserInputService")
---
local Character
local Human
local HumanRoot
local del = false
---
game.Players.LocalPlayer.CharacterAdded:Connect(function(char)
... | 120637 | ||||||||
1 | My code is calling a function before the trigger does? | 332695720 | nafey200 | 52 | 2021-04-14 00:29:31 | <p>It's very confusing and only yesterday it was working fine.</p>
<pre class='brush: lua'>local functionblock3 = game.workspace.FunctionBlock3
local AppearingBlock = game.workspace.AppearingBlock
functionblock3.Touched:Connect(function()
local functionblock3 = "functionblock3 in use"
print (functionblock3)
... | 122351 | 1 | 111469 | 1 | 1792778813 | Xapelize | 1459 | 2021-04-14 08:22:07 | <p>Because your not touching a part but "SOMEONE" else does, its not a player, its a part!!!!!!!! detecting if theres humanoid and fire it to fix</p>
<p>like putting an <code>if player:FindFirstChild("Humanoid") then</code> in line 2</p>
|
0 | I'm making an admin panel and the player list wont update? | 35708167 | Marolex | 45 | 2014-07-19 18:10:24 | <p>So the gui will list the players in a server but it will not update upon a player leaving/joining unless you rejoin or reset.</p>
<p>any help?</p>
<p>here's the code to update it</p>
<pre class='brush: lua'>local pos = 0
function update()
pos = 0
for k,v in pairs(frame.Plays:GetChildren())do
v:remove... | 8365 | 2 | 11093 | 1 | 3110492 | Bebee2 | 195 | 2014-07-23 11:24:44 | <p>Here it is in a simple aspect:</p>
<p>If this script is a <strong>LocalScript</strong>, then you should know PlayerAdded and PlayerRemoved don't work properly</p>
<p>If this script is a <strong>Regular Script</strong>, I assume that you only update <em>frame.Plays</em> within StarterGui <strong><em>instead</em></str... |
0 | Is there a way to bypass Trust Check? | 527770957 | D3F4ULTL00K | 2 | 2020-10-25 23:17:53 | <p>I made a script that allows you to upload games pretty easily and force you r6 as well as allow shiftlock instantly without having to edit any game settings.</p>
<pre class='brush: lua'>-- Auto Settings by Tohru
local Max_Players = tonumber(game:GetService("MarketplaceService"):GetProductInfo(game.PlaceId).Descripti... | 114896 | 1 | 105546 | 0 | 273093957 | Rare_tendo | 2714 | 2020-10-25 23:30:04 | <p>Roblox doesn't allow HTTP requests to be sent to their domain (anything with "roblox.com" in the URL) from studio or from the roblox client; however, there is a proxy server: <a target="_blank" href="http://rprxy.xyz/">rprxy.xyz</a>. Basically, you'd want to replace all your URLS with <code>roblox.com</code> in it t... |
1 | How do I create developer products? | 6283170 | AmidaKami | 0 | 2014-04-30 23:50:18 | <p>Okay so I have this game and I want to have some developer products. The problem is that I dont know the script. Like how do I make it purchasable in game. I dont know how to make a gui and I dont know how to give them player points for winning the game. Could someone help me with the script on how to make developer... | 4025 | ||||||||
2 | Is it possible to make just 1 Player's Character not Auto-Load? | 21386552 | acecateer | 130 | 2015-04-08 23:03:22 | <p>I made a script that reassigns someone's Character property of their Player Instance to a different model and it works, But... After you walk around as that newly assigned Character for about 3 seconds your Player realized that it's not in the right Character and reloads me. Is there anyway to make it not do that? I... | 16510 | ||||||||
0 | How do I position a seat relative to another seat? | 102254161 | squidiskool | 210 | 2021-05-19 00:02:30 | <p>Help, I'm trying to make a slot car connector, the problem I am having is trying to position the seat,,,, when it spawns the seat is still the same position as the old seat. Help???</p>
<pre class='brush: lua'>local tool = script.Parent
local event = tool:WaitForChild("Signal2")
local function ReceiveSignal2(point)
... | 123576 | ||||||||
1 | Why is my Model Placer script working only in ROBLOX Studio and not in game? | 35711227 | MatiWielun | 35 | 2018-07-19 15:52:04 | <p>I am currently wondering why is a LocalScript working perfectly in Studio, but does nothing in the game itself.</p>
<p>The LocalScript itself:</p>
<pre class='brush: lua'>lp = script.Parent
local debounce = false
function onButton1Down(mouse)
if not debounce then
debounce = true
local grenade = game.ServerSt... | 63213 | 1 | 61471 | 0 | 160570032 | Omega_bs | 40 | 2018-07-19 16:07:10 | <p>It being Fe or Non-FE aside i have made a Non-FE Demo that can be Edited and Researched thru</p>
<p>So what i've done is Placed the Grenade Model into game:GetService("ReplicatedStorage")</p>
<p>I don't know why it worked that time but its probably because i didn't mind to change it</p>
<p>And since its a Local Scri... |
0 | How to make tools without Tool.Activated work on mobile? | 1521560907 | craftedx_leah | 0 | 2022-08-08 11:30:26 | <p>This is my first time using Scripting support, i apologize if there were a mistake.</p>
<p>I am still mediocre at scripting, sorry if i misunderstood some parts.</p>
<p>I wanted to make my tool work with mobile, but the tool doesn't work with OnActivated()</p>
<p>I used roblox Golden Steampunk as my tool template to... | 131145 | ||||||||
2 | How to trigger if string = any number? | 41100413 | BSIncorporated | 640 | 2015-04-30 05:41:01 | <p>Im trying to make a script that's activated when a player chats, I know how to control triggers of strings = letters, but how would I trigger based on any given value: Example (not meant to be serious)</p>
<pre class='brush: lua'>if string == ANYVALUE then
--Actions
end
</pre>
| 17130 | ||||||||
0 | How to Tween the camera to the player | 5369558 | SaintsRow2lover | 0 | 2014-02-20 04:41:29 | <p>Need some help on how to make the camera tween from one position to the player</p>
| 153 | ||||||||
0 | How to load a player's character's model? | 1029232712 | UltimateGameDudez | 19 | 2020-07-01 06:13:48 | <p>I am trying to make a winning cutscene so when a player wins a round, the game will load their character, make them dance and have a cutscene saying "Player's name won the game!!!!!"</p>
<p>I've tried using</p>
<pre class='brush: lua'>:GetCharacterAppearanceAsync()
</pre>
<p>although this doesn't seem to work direct... | 107913 | 1 | 99211 | 0 | 56389 | Sparks | 534 | 2020-07-01 06:40:59 | <p>You can do this with <a target="_blank" href="https://developer.roblox.com/en-us/api-reference/function/Players/GetHumanoidDescriptionFromUserId">Players:GetHumanoidDescriptionFromUserId</a> and <a target="_blank" href="https://developer.roblox.com/en-us/api-reference/function/Humanoid/ApplyDescription">Humanoid:App... |
0 | What can you use TweenService for in roblox studio? | 233224360 | mastercheeseit | 50 | 2020-10-16 22:06:00 | <p>So i am making a game and i am wondering if you Can you use TweenService in GUI's so we can make animation with things like TextButton's and many more things in GUI.</p>
| 114444 | 2 | 105110 | 1 | 161262344 | sean_thecoolman | 190 | 2020-10-16 22:12:34 | <p>TweenService can for sure be using in GUIs.
It can be used in a variety of other things, too, like parts and PointLights.
TweenPosition can also be used, as it's a part of TweenService. It is used to move things once without having to construct something like this:</p>
<pre class='brush: lua'>local ts = game.TweenSe... |
0 | How do I check when a gui's button is clicked? | 101146721 | DemGame | 271 | 2020-07-19 04:39:37 | <p>How do I check when a button inside of a GUI is clicked? The scripts from ROBLOX's website don't work for some reason.</p>
| 109421 | 1 | 100487 | 1 | 1775867071 | FunctionalMetatable | 490 | 2020-07-19 07:57:09 | <p>You need a TextButton or an ImageButton to register a <a target="_blank" href="https://developer.roblox.com/en-us/api-reference/event/GuiButton/MouseButton1Click">MouseButton1Click</a> or <a target="_blank" href="https://developer.roblox.com/en-us/api-reference/event/GuiButton/MouseButton1Down">MouseButton1Down</a> ... |
1 | Some Way To Search For Models By Group? | 60261990 | Benbebop | 1049 | 2021-01-17 20:00:26 | <p><em>Reposting after 96 hours of no answers, also new information</em></p>
<p>I want to search for all models created by a <a target="_blank" href="https://www.roblox.com/groups/9144340">group</a>. Google searches provide outdated or unanswered questions. Previously it seems the <a target="_blank" href="https://devfo... | 118825 | 1 | 108653 | 1 | 151779037 | Ashedee | 43 | 2021-01-17 23:49:06 | <p>After Reading <a target="_blank" href="http://">https://developer.roblox.com/en-us/articles/Catalog-API</a> and researching online</p>
<p><strong>Iron_Legion</strong> <em>Roblox Staff</em></p>
<blockquote>
<p>Jun '19</p>
<p>You shouldn’t need to know the agent ID to be able to fetch catalog items for a group. You ca... |
0 | How can I use a local axis in scripts? | 480702536 | cancle5 | 120 | 2022-05-09 15:06:27 | <p>I have recently been working on a project and I ran in an issue where whenever I move a part with a script it always moves on the global axis. Let's say I want to move a part 1 stud on the local axis, how would I do that in a script?</p>
<p>Basically moving something on the local axis is moving it left or right acco... | 129967 | ||||||||
0 | Why am I getting this error when I try to rename a value? | 1503498860 | surviarlTheJefkillre | 38 | 2021-05-04 23:05:35 | <p>Im trying to store the name of a part in a string variable. but I keep getting this error:
Players.Paczki_TCBC.PlayerScripts.LocalScript:35: invalid argument #3 (string expected, got Instance)</p>
<p>here's the part of my script that is broke:</p>
<pre class='brush: lua'>UIS.InputEnded:Connect(function(input)
if... | 123106 | ||||||||
0 | Why can't i change the IntValue in StarterGui? | 359590587 | Sorukan | 240 | 2019-01-19 23:19:43 | <p>Basically a server script that reduces the stamina when the event has been called.
I don't know why but the IntValue inside the StaminaGui doesn't change.</p>
<pre class='brush: lua'>--//Services
local replicatedStorage = game:GetService('ReplicatedStorage')
local gui = game:GetService('StarterGui')
--//Variables
lo... | 74746 | 1 | 70349 | 2 | 182139900 | WideSteal321 | 769 | 2019-01-19 23:26:55 | <p><strong>Once you "Start up" the game it is no longer in <code>StarterGui</code> yet it is in <code>PlayerGui</code> here is a fixed <code>script</code></strong></p>
<p>if it is a local script:</p>
<pre class='brush: lua'>local player = game.Players.LocalPlayer --grabs the player for the script
--//Services
local rep... |
0 | Why does my code not work? I want to make an user chose there gravity | 539909602 | Retallack445 | 24 | 2020-07-02 23:05:34 | <p>I want to make an user chose there gravity but the code i am using it does not work.
This is the code:</p>
<pre class='brush: lua'>local TextBox = script.Parent.Parent.TextBox
game.Workspace.Gravity = TextBox
</pre>
| 108061 | ||||||||
0 | [SOLVED] How to make code wait until :MoveTo() is finished? | 164364098 | XRed03 | 15 | 2022-06-19 15:41:26 | <p>So I am trying to make a code that makes a dummy walk to random positions across the map. I am using a system that involves using a <code>while true do</code> statement. the thing is, while the dummy is walking, another <code>:MoveTo()</code> code interferes. if have tried to use <code>repeat wait() until humanoid.M... | 130406 | ||||||||
0 | Weird Error in output for any script I write? | 6038417 | generalsteve | 0 | 2015-02-03 21:31:42 | <p>no matter what script I write I see</p>
<p>httpGet https://api.roblox.com/userblock/getblockedusers?userId=6038417&page=1 failed. Trying again. Error: HTTP 403 (HTTP/1.1 403 Forbidden). Elapsed time: 0.404019</p>
<p>this is very frustrating I've written a lot of code and now none of it will work any script I wr... | 14725 | ||||||||
0 | difference between these two methods? | 325658797 | ZeroToH3ro | 82 | 2022-05-20 05:02:11 | <pre class='brush: lua'>local part = game.Workspace:FindFirstChild("Spawn")
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(chr)
local hrp = chr:FindFirstChild("HumanoidRootPart")
hrp:PivotTo(part.CFrame)
end)
end)
</pre>
<... | 130053 | 1 | 117445 | 0 | 559514967 | T3_MasterGamer | 242 | 2022-05-20 09:19:34 | <p>I don't think there's a difference. If you're teleporting a player, an npc, or a model, you definitely <code>use Model:PivotTo()</code>. But if you're teleporting a specific part, you use <code>Part:PivotTo()</code>.</p>
|
0 | This Noob auto-spawn decided to just stop working. Why? | 77795905 | brendanbook | 2 | 2021-07-20 22:06:03 | <pre class='brush: lua'>local m = game.ServerStorage.Clones.Noob:Clone()
while true do
wait(1)
local cloned = m:Clone()
cloned.Parent = script.Parent
cloned:MoveTo(Vector3.new(math.random(-150,150), 10, math.random(-150,150)))
cloned:makeJoints()
end
</pre>
<p>This used to work, but it just randomly... | 125548 | 1 | 114253 | 1 | 1062119365 | XObbyCreatorX | 38 | 2021-07-21 01:47:49 | <p>The problem is, you are cloning an object that is already been cloned.</p>
<p>I suggest you do this :</p>
<pre class='brush: lua'>local m = game.ServerStorage.Clones.Noob
while true do
wait(1)
local cloned = m:Clone()
cloned.Parent = script.Parent
cloned:MoveTo(Vector3.new(math.random(-150,150), 10, math.random(-150... |
1 | How to make a script that spawns a model on button click? | 1752724383 | Xyternal | 192 | 2021-05-13 18:15:35 | <p>Hello everyone! I was creating a boat fighting game where people have to press a button, and the boat model will spawn. I have constructed the boat and all, but I still don't know how to make the script (I am really, really new to scripting). Can you please send me links to tutorials? Or better, give me instructions... | 123408 | ||||||||
0 | 'Infinite mining' and preventing overlapping? | 2182958 | Dummiez | 360 | 2014-05-07 03:54:31 | <p>Alright, so I decided to work on a pickaxe that basically generates new blocks when the previous block is destroyed, creating an '<em>infinite mine</em>' effect. If you ever heard of, or played the game Epic Mining 2 by Piedude777, his is able to detect whether that area has already been mined.</p>
<pre class="brush... | 4465 | ||||||||
1 | ERROR: attempt to perform arithmetic (add) on nil and Vector3? | 136956813 | Matrixmaximus867 | 9 | 2022-08-03 20:01:18 | <pre class='brush: lua'>target.PrimaryPart=target.HumanoidRootPart
target:SetPrimaryPartCFrame(
CFrame.new(pos,pos+target.HumanoidRootPart.CFrame.lookVector))
</pre>
<p>What is wrong with these lines of code that would give me this error message? (the title)</p>
| 131086 | ||||||||
0 | How to force a player to look a certain direction? | 27057428 | Tortelloni | 315 | 2015-05-03 02:37:55 | <p>How do I stop a player from rotating his/her character around? Kind of like mouselock except without the ability to turn around.</p>
| 17230 | 1 | 20618 | 8 | 29413559 | alphawolvess | 1784 | 2015-05-03 03:26:01 | <p>This is a lot easier than what you might think.
Their is a boolean value named <em>AutoRotate</em> inside of the Humanoid, now using it is also very easy.
I'll just show you how to do it by using the touched event.</p>
<pre class='brush: lua'>script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChi... |
2 | Why won't value change to what I type up in the Textbox?? | 433962773 | theking66hayday | 841 | 2023-03-18 18:14:26 | <p>In this normal script in serverscriptservice What I type in the text box won't go to the value
weird part is that what I have the value to say for like 0 the textbox's text will say 0 but if I type anything into the textbox the value won't change.</p>
<pre class="brush: lua">local val = game.Workspace.Part.Value
... | 133210 | 1 | 120269 | 2 | 111567127 | Jay123abc2 | 241 | 2023-03-18 18:51:27 | <p>Simple fix here.
When you type something into a textbox, it only changes in the <strong>client</strong>. This means the <strong>server</strong> has no access to see it.
If you need the server to see what is put in the textbox, I recommend you use a <a target="_blank" href="https://create.roblox.com/docs/scripting/ev... |
0 | How to reduce exponential lag from script use? | 215833213 | Stiles8353 | 35 | 2023-03-10 01:10:39 | <p>This script here;</p>
<pre class='brush: lua'>local RockScript = require(game.ServerScriptService.RockScript)
print(RockScript.allrocktable)
rock = script.Parent
local startpos = rock.Position
table.insert(RockScript.allrocktable, rock.Position)
no_right_rock = 0
no_left_rock = 0
no_back_rock = 0
no_front_rock = 0
n... | 133171 | ||||||||
0 | How do i make 'F' do something and fixinfinite yield? | 1775753594 | Not_prototype | 26 | 2020-11-23 13:49:22 | <p>~~~~~~~~~~~~~~~~~
local Player = game:GetService("Players").LocalPlayer</p>
<p>local rp = game:GetService("ReplicatedStorage")
local Barrage = rp:WaitForChild("BarragePress")</p>
<p>local UIS = game:GetService("UserInputService")</p>
<p>local debounce = false
local cooldown = 3</p>
<p>UIS.InputBegan:Connect(function... | 116204 | 1 | 106631 | 0 | 211600826 | LightningLIon58 | 47 | 2020-11-23 13:51:16 | <p>Infinite yield just means that the script is paused. Probably because it couldn't find your BarragePress, so it just waited forever for it to exist. Make sure BaragePress is an actual thing in the ReplicatedStorage.</p>
|
0 | how do I check if a player has bought a pass? | 438991969 | SWBTyresse | 14 | 2020-07-31 23:54:36 | <p>ive been trying to figure this out for over a hour and I can't. Im trying to do something if the player actually buys the gamepass. I would prefer to do it in this if statement because this if statement is in a touched event and the only way to get the gamepass ID is to get it from the touched event</p>
<pre class='... | 110427 | ||||||||
1 | My tool does not parent itself to Lighting. Any errors in my script? | 1173028351 | RazorXX2 | 12 | 2021-05-30 14:27:09 | <pre class='brush: lua'>wait(0.1)
if script.Parent.Parent.Parent.Name == not "RazorXX2" then
script.Parent.Parent = game.Lighting
end
wait(0.1)
script:Destroy()
</pre>
<p>Help! The script is not working, the tool is showing up for everyone. So the concept here is that if the name of the player is not "RazorXX2" the... | 123921 | ||||||||
0 | How do I add another text in string.sub? | 1250400320 | LUCATIVIOMAD2 | 54 | 2020-04-26 20:22:15 | <p>When I try</p>
<pre class='brush: lua'>local texts ={
"TestMessage 1",
"TestMessage 2"
}
wait(8)
for i = 1,#texts do
script.Parent.Text = string.sub(texts,1,i)
wait(0.1)
end
</pre>
<p>it won't work while it work before I added the second one.</p>
<pre class='brush: lua'>local text = "test message"
wait(8)
fo... | 100861 | 1 | 93137 | 1 | 1169362290 | iiMxtt_Destinyii | 62 | 2020-04-26 21:11:20 | <p>Firstly, I noticed you we're using an Array of Text Strings so before, we can do anything. We will need to require those messages by using a simple method:</p>
<pre class='brush: lua'>for i,v in pairs(Sayings) do -- Gathering all the Messages typed in the Array.
</pre>
<p>We will also need to determine how fast the ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.