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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | How do I fix error: expected assignment or a function call ? | 479363584 | TheExtremeChocolate | 11 | 2020-12-26 08:20:18 | <pre class='brush: lua'>-- Define variables
local Replicated = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")
local MapsFolder = ServerStorage:WaitForChild("Maps")
local Status = ReplicatedStorage:WaitForChild("Status")
local GameLength = 500
local reward = 50
-- Game loop
w... | 117711 | ||||||||
1 | Do tools bypass the FE system? | 118979099 | Clorize | 31 | 2020-06-23 14:51:12 | <p>Hello,
I do know that the PlayerCharacter can bypass the FE system.
Any exploiter can change their speed as simple as this:</p>
<p><code>game.Players.LocalPlayer.Character.Humanoid.Walkspeed = 100</code></p>
<p>This part I know, but I have another question:</p>
<p><strong>Is there any exceptions to this rule? Are to... | 107193 | 1 | 98608 | 2 | 310696583 | LeHelary | 87 | 2020-06-23 14:58:38 | <p>Players can change, copy, download, anything on their client.
What they do locally does not replicate on the server, for the exception of the character, so changing walkspeed, jumppower, and things like this on the client change the way the humanoid moves and is seen by everyone in the server. Even if the server can... |
0 | Making a music script use a table??? | 55310986 | hokyboy | 250 | 2021-01-10 09:14:39 | <pre class='brush: lua'>local Sound = script.Sound
local ContendProvider = game:GetService("ContentProvider")
local MaxSound = 2
local CurrSound = 0
local Music = {
551334045,
1524396093,
627848963,
}
while true do
if CurrSound <= MaxSound then
Sound.SoundId = "rbxassetid://"..Music[CurrSound... | 118494 | 1 | 108403 | 1 | 1085356580 | LeedleLeeRocket | 1179 | 2021-01-10 09:24:12 | <p>Ah. CurSound has to be greater than 0. You're trying to get the 0th string in the table.</p>
|
1 | ToyotaChaser not a valid member of ServerStorage? | 102254161 | squidiskool | 200 | 2019-06-28 16:35:57 | <p>Hello, I am trying to make a car spawner gui for my testing game. Here's the code.</p>
<pre class='brush: lua'>script.Parent.MouseButton1Click:connect(function(GetCar)
local Mod = game.ServerStorage.ToyotaChaser --Change test to whatever you have named the item you want to spawn
local clone = Mod... | 82607 | 3 | 76806 | 0 | 96434321 | RecycleBicycle | 60 | 2019-06-28 22:19:52 | <p>reading the simple script what you did wrong is store the car in ServerStorage! when instances are placed in the ServerStorage it will store everything in the server not the client! to fix this make sure that your connect is spelt with a capital! change your Mod variable to</p>
<pre class='brush: lua'>local Mod = ga... |
3 | table.foreach(), being deprecated? | 85080168 | LuaQuest | 450 | 2015-09-12 21:28:47 | <p>Just wondering, can (or should) i still use table.foreach whenever necessary? The reason i ask this is just to wonder if there's a difference between them, and for loops. for example:</p>
<pre class='brush: lua'>local dictionary = {
x = 1,
y = 2,
z = 3
}
table.foreach(dictionary,function(k,v)
print('... | 22660 | 1 | 26280 | 3 | 3508838 | DigitalVeer | 1473 | 2015-09-12 22:43:59 | <h2>An Introduction</h2>
<p><code>table.foreach</code> is actually a quick and fast way to merely output different keys and values in a table. If you are curious as to why exactly it is deprecated, it is because the <code>table.foreach</code> method was originally in Lua <strong>before the introduction</strong> of <cod... |
0 | Why do my scripts act differently online? | 8577491 | Powerhalo | 10 | 2014-07-26 02:40:33 | <p>I am used to testing things in Solo Play on studio but when I went to test Online, it doesn't work anymore and I get a bunch of errors that I fixed using "wait(5)"</p>
<p>One error is related to the fact that the StarterGui loads after the Backpack.</p>
<p>Not only that but a bunch of scripts unrelated to the GUIs o... | 8705 | ||||||||
1 | What is FindFirstAncestor and FindFirstAncestorWhichIsA? | 233224360 | mastercheeseit | 77 | 2020-09-20 14:59:15 | <p>I tried to find more about this but didn't get much detail about these differences and why are they used for if you can help about it. It will be really appreciated.</p>
| 113403 | ||||||||
0 | How do I trigger a script when a certain body part touches a part? | 93595147 | verrdin | 0 | 2021-02-16 00:18:34 | <p>In my game, if the player steps on a certain pad they will be granted +10 coins. Here is the script I'm using:</p>
<pre class='brush: lua'>script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then wait(0.4)
game.Players:FindFirstChild(hit.Parent.Name).moneystats.Coins.Valu... | 120218 | ||||||||
0 | How to make a script that makes another tool when specific tools collide? | 531411100 | artemzvolinskii | 2 | 2023-01-23 08:59:01 | <p>I want to make a game similiar to Cube Fusion/Combination, and i dont have the knowledge to make the script myself, i couldn't find any youtube tutorial's or any similiar problems, so please help me out on this one.</p>
| 132921 | 1 | 120056 | 0 | 250740876 | Partykidcrazy | 15 | 2023-01-23 21:58:37 | <p>clone it out of server storage with a server script. if your asking for a script, thats against the rules but you could try asking for help at the roblox studio discord community. if not, search up how to set up events and once two parts touch with the same tag or same parts on an array of sorts get the position, cl... |
1 | Colors not working as expected? | 97987921 | awad6314 | 9 | 2018-08-01 17:05:20 | <p>I'm sorry, this is a really basic question but something weird is happening with colors. I'm making a part that displays a teams color directly from a brickcolor variable that is the teams color. When this script runs, I get an error that says bad argument #1 to 'new' (Color3 expected, got BrickColor). I'm sorry aga... | 64352 | 4 | 62414 | 0 | 38618416 | Voy1980 | 111 | 2018-08-01 17:26:55 | <p>A BrickColor value is already a brickcolor. Therefore, you do not need to add a new brickcolor. Literally just take the value and set it equal to the property of the brick.</p>
<pre class="brush: lua">while true do
wait(.01)
if script.Parent.BrickColor ~= script.Parent.Parent.Parent.Parent.TeamColor.Value th... |
0 | How do i make a point giver without cooldown affecting other players? | 827900517 | Megati_PL | 2 | 2023-01-10 17:50:39 | <p>a part that is a point giver and it has a cooldown but that <strong>don't affect any other players</strong>
Sorry for asking basic questions but I'm a beginner.
And i don't have any code written by me so can you write for me please?</p>
| 132799 | 1 | 119935 | 0 | 308572986 | bittyboy1234 | 91 | 2023-01-10 17:59:34 | <p>server script in ServerScriptService</p>
<pre class='brush: lua'>game.Players.PlayerAdded:Connect(function(plr)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "Leaderstats"
leaderstats.Parent = plr
local points = Instance.new("IntValue")
points.Name = "points"
points.Parent = leaderstats
end)
</pre>
<... |
0 | How would I make sound regions pause and resume instead of restarting everytime you enter it? | 215833213 | Stiles8353 | 35 | 2022-08-10 19:15:16 | <p>This is AlvinBlox's SoundRegion script, and I edited it a bit to try and make the music pause and resume, yet it still just restarts when you re enter the area. Can someone help find where the error is?</p>
<pre class='brush: lua'>local SoundRegionsWorkspace = game.Workspace:WaitForChild("SoundRegions")
local Found ... | 131183 | 1 | 118495 | 0 | 368080440 | VAnkata20 | 135 | 2022-08-10 19:59:27 | <p>I have tried this and it appears to be working</p>
<pre class='brush: lua'>local SoundRegionsWorkspace = game.Workspace:WaitForChild("SoundRegions")
local Found = false
while wait(0) do
for i, v in pairs (SoundRegionsWorkspace:GetChildren()) do
Found = false
local region = Region3.new(v.Position ... |
0 | How would you grab all the text from a site and store them in a variable? | 80698448 | RBXData | 0 | 2015-03-16 03:13:13 | <p>What I'm trying to do is use HttpService, and grab all the text from a site and store them in a variable which is exactly what I put in the title of the question.</p>
<p>I'm <strong>REALLY</strong> confused right now.
Also HttpService is enabled.</p>
<pre class="brush: lua">local HttpService = game:GetService("HttpS... | 15805 | ||||||||
0 | How do you script a model that moves to the side once touched? | 20730862 | TrunksTakaski | 20 | 2014-05-01 01:13:59 | <p>How do you make a script that makes a Model move to the side once you touch it, I have been messing up on this.</p>
| 4035 | ||||||||
0 | StudioService:GetClassIcon how does this even work? makes no sense | 473061959 | johnoscarbhv1 | 122 | 2021-10-13 18:28:03 | <p>Hello, I am currently making a plugin to make my scripting jobs easier but I encountered a problem because I was using free decals to use as my plugin Icon but they are not really good and look stretched. I came across this in the API documents (https://developer.roblox.com/en-us/api-reference/function/StudioService... | 127857 | ||||||||
0 | How can I disable fighting moves while players are in a certain area? | 64427627 | osamayousef123 | 14 | 2020-04-25 03:03:31 | <p>I have a lobby in my game where players wait until they spawn in a map. I typed out this code but it didn't work. The local scripts identified in the code are the scripts that bind a key to a move and I also put a huge part that covers the entire lobby that represents the space in which players won't be able to use ... | 100616 | ||||||||
0 | How do I spawn an image of the player for every player in the game? | 1379598761 | Scryptol | 2 | 2020-11-21 20:05:15 | <p>When a player joins, I'm trying to get it to spawn an image of every other player but I can't get it to work. Why? This is what I'm doing.</p>
<pre class='brush: lua'>game.Players.PlayerAdded:Connect(function(plr)
game.ReplicatedStorage.Events.PlayerJoined:FireAllClients(plr)
for i, v in pairs(game.Players:G... | 116119 | ||||||||
0 | Train door will not open? | 538824226 | Brioche_Noodle | 45 | 2022-08-04 12:01:01 | <p>I installed train doors into my metro train and it's basically a left union and inside is the parts used for the position ( like OpenPos and ClosePos )</p>
<p>Now I wanted 1 side to open for my game so I added an if statement so like If side ( Variable ) Is "Right" Then do the tween but now it doesn't work? I added ... | 131094 | ||||||||
1 | Why isn't FireAllClients replicating to all clients? | 222780221 | Green_Lime2 | 80 | 2020-10-30 02:24:20 | <p>I have code that will send a system message in the chat about who the player is and if they joined or left.</p>
<p><strong>The issue:</strong></p>
<p>I used FireAllClients on the server script and in the chat, it didn't say that I joined the game or anything.</p>
<p>A little help? Thanks!</p>
<p><strong>Server Scrip... | 115084 | ||||||||
0 | How do i make it so it detects gamepasses? | 1842980164 | jakubiscool5 | 6 | 2022-05-01 22:13:56 | <p>I have a donation game but it says that i dont own the gamepass (I mean like made it) but here is the code</p>
<pre class='brush: lua'>script.Parent.MouseButton1Click:Connect(function()
local text = script.Parent.Parent.Text
local success, err = pcall(function()
script.Value.Value = game.MarketplaceS... | 129883 | 1 | 117356 | 0 | 83827805 | KingDomas | 148 | 2022-05-02 11:25:21 | <p>You haven't put an id in? Here's a script for checking if you own a gamepass:</p>
<pre class='brush: lua'>local id = --Type your gamepass id here.
game.Players.PlayerAdded:Connect(function(plr)
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(
plr.UserId,id) then --checks if player owns gamepass
--Ga... |
1 | Detecting if a player kills a player | 5206310 | alibix123 | 175 | 2014-02-18 12:58:26 | <p>I'm making a PvP game, and I have no idea where to start on detecting who killed a player.</p>
| 60 | 1 | 118 | 5 | 19566737 | Unclear | 1776 | 2014-02-18 13:07:46 | <p>Many people use "creator tags" to go about doing this.</p>
<p>What they do is add a snippet of code inside the code that deals damage to a character; this is where a "tag" is created. Often, this tag is an ObjectValue with the player who dealt the damage (or the "killer") set as the Value property of the ObjectValue... |
0 | How would I put a hat onto a Player? Character Customization | 1880161 | excellentAnarchy | 50 | 2015-04-13 19:50:42 | <p>I have 2 different copies of hats inside of game.ReplicatedStroage.Hats.M > Hat1 and Hat2 are inside it, I would like the script to put a hat on, but using a Value of script.Parent.Hat</p>
<p>So player touches the brick and then he gets the Shirt, Pants, Face, but also a Hat, the same way Shirt and Pants are put on.... | 16675 | ||||||||
1 | How to make a DataStore? Server-Sided | 1288500822 | Finty_james | 269 | 2021-03-26 16:36:47 | <p>I know about dataStores, but I barely know how to use them. If you want to observe my code, here you go:</p>
<pre class="brush: lua"> DDS = game:GetService("DataStoreService")
DDS:GetDataStore("MyDataStore")
</pre>
<p>I think that Is how you get a DataStore. If not, can anybody alert me?</p>
| 121708 | 1 | 110883 | 1 | 30165668 | prooheckcp | 340 | 2021-03-26 17:55:32 | <p>It's honestly better to just read the official roblox tutorial on this:</p>
<p>https://developer.roblox.com/en-us/articles/Data-store</p>
<p>If you're looking for an already pre built DataStore system that can easily be edited you can just use my library: https://github.com/prooheckcp/ProStore</p>
|
0 | Why does this error as infinite yield possible? | 57004073 | g1o2r3d4a5n6 | 350 | 2017-12-23 14:54:14 | <p>So i have this server script which works with FE:</p>
<pre class="brush: lua">function idle_music(action)
if action == "add" then
print("adding")
local random = lobby_songs[math.random(1, #lobby_songs)]
local replicatedStorage = game:GetService("ReplicatedStorage")
for _, p in pai... | 50791 | ||||||||
0 | If this equals to that or another? | 48031818 | IXLKIDDO | 110 | 2015-05-24 13:46:56 | <p>No grammar found. Anyways, what I was trying to say in the title is how would I make one of the "equal to" statements accept two possible values. Here is an example:</p>
<pre class="brush: lua">If v == random1 or v == random2 then
</pre>
<p>However, I wanted to know if there was a way I could combine the two. As in ... | 17810 | 3 | 21277 | 6 | 13667373 | EzraNehemiah_TF2 | 3552 | 2015-05-24 14:12:36 | <p>You are completely correct. Use the <a target="_blank" href="http://wiki.roblox.com/index.php?title=Or_operator#Or"><code>or</code></a> operator.</p>
<hr/>
<h2>or Operation</h2>
<p>Like <code>not</code> or <code>and</code>, the or operation in if then statements will see if something will equal this, OR if it will e... |
0 | Is there a way i can decrease the damage that this npc does? | 153839829 | matty123465 | 11 | 2020-09-05 22:45:27 | <p>I have this NPC I'm making and I used a free model and turned it into something else I couldn't find out how to decrease the health it does here's the two scripts that came inside not including the animation script</p>
<pre class='brush: lua'>debugMode = false
targetNPCs = false
--
h = script.Parent.Parent:WaitForCh... | 112759 | ||||||||
1 | Does roblox allows modules in module? | 190357083 | THUNDER_WOW | 149 | 2020-07-17 08:27:17 | <p>Does roblox allow modules to be able to require other modules?
Like...</p>
<pre class='brush: lua'>-- MainModule
local Module 2 = require(###########)
</pre>
<pre class='brush: lua'>-- Module 2
local Module 2 = require (###########)
</pre>
<p>^^^Does this work on roblox and is this allowed in scripts?</p>
| 109257 | 1 | 100298 | 2 | 36537369 | gskw | 1026 | 2020-07-17 10:12:39 | <p>Yes, ModuleScripts are allowed to <code>require</code> other ModuleScripts. In fact, with more complex games, it is good practice to have sub-dependencies (with a hierarchical structure) rather than a flat structure. So for example, your modules could be like this:</p>
<pre class='brush: lua'>GameModule
-> GunMo... |
0 | ServerScriptService.Values:19: invalid argument #2 to 'random' (interval is empty) ? | 1722023006 | OhBrotherGaminYT | 11 | 2021-05-03 14:08:23 | <pre class='brush: lua'>local Rolelist = {
["Mafia"] = 1,
["Doctor"] = 2,
["Jailor"] = 3
}
local Role = Instance.new("IntValue", plr)
Role.Name = "Role"
Role.Value = 0
local function random2()
local number = math.random(1, #Rolelist)
repeat
number = math.random(1,... | 123056 | 2 | 112136 | 0 | 1708043824 | TheLuminent | 970 | 2021-05-03 22:21:37 | <p>I don't believe you've provided the full script; so I don't know where the line 19 quoted in the title is.</p>
<p>I hope maybe by rewriting this section I can help others understand this more.</p>
<pre class='brush: lua'>local RoleUsed = {}
local RoleList = {}
RoleList["Mafia"] = 1
RoleList["Doctor"] = 2
RoleList["J... |
0 | Why isn't this smoothly zooming in? | 22814853 | Senor_Chung | 210 | 2015-04-09 02:32:54 | <p>I have this script, where when you equip it you smoothly zoom in until you are in first person but it doesn't smoothly zoom in, it just locked immediately when I equip the tool.</p>
<p>here is the script:</p>
<pre class='brush: lua'>script.Parent.Equipped:connect(function()
local gui = game.Players.LocalPlayer.P... | 16517 | ||||||||
0 | Can you please help with my survival horror game? | 536049572 | NiroTurtle | 83 | 2020-01-22 09:33:29 | <p>So I'm making a survival horror game and I need it so it can somehow know if a player has escaped to a player being killed. The script checking if there are no players in a team is below. Please help!</p>
<pre class='brush: lua'>if #teamplayers == 0 then
for _, v in pairs(game.Players:GetChildren()) do
i... | 93405 | ||||||||
1 | How can i prevent team killing? | 188090490 | Seabiscuitz | 21 | 2017-02-17 22:38:08 | <p>Quite self-explanatory. How can i prevent team killing with a script just simply put into the workspace? I read the Prevent team killing article on ROBLOX Wiki, but it only gave me the information on how to make certain weapons Anti Team Kill weapons. Thanks! :)</p>
| 40225 | 1 | 42275 | 2 | 76655464 | LightModed | 81 | 2017-02-17 23:03:49 | <p>When you make your own guns(assuming you know how) just make the bullets check whether the touched(player?) is on your team or not.</p>
|
1 | Your title should be specific! Describe your problem concisely.? | 388243015 | hasanchik | 49 | 2019-12-28 09:35:42 | <p>It was just saying Your title should be specific! Describe your problem concisely.
And i didn't know what to make the title. Any way, here is the question:
can you help me with this code? There are no errors in the code but it output "Bad Id"</p>
<pre class='brush: lua'>function onTouched(hit)
local player = gam... | 92072 | ||||||||
0 | How do I fix the annoying teleport script? | 1006261694 | Crashbandicoot9024 | 2 | 2021-01-13 15:04:37 | <p>I have a problem in my game, it teleports the player to a game named Loading... and then back to the main game. I want to remove it and I think it comes because of a plugin, but I don't know or that is true. If I try to delete the script, it automatic is placed back. I can't find any other teleport script than the o... | 118641 | ||||||||
0 | I can't get a rainbow name tag? | 133043983 | Disqrete | 10 | 2020-07-31 23:02:21 | <p>So I made a script for a name tag with the group rank. I am trying to make it so I have a rainbow name tag and group rank, but it is only making my group rank rainbow and not my name. Please help!</p>
<pre class='brush: lua'>local commands = {}
function Create(ClassName)
return function(Properties)
local Obj = In... | 110418 | ||||||||
0 | attempt to perform arithmetic on a nil value??????? | 15035874 | advancedev | 70 | 2017-01-01 08:38:03 | <p>what is wrong with this it works but i keep getting this error:
5: attempt to perform arithmetic on a nil value</p>
<pre class='brush: lua'>local pointlabel = script.Parent.Points
local pointvalue = game.Players.LocalPlayer:WaitForChild("Stats"):WaitForChild("Points")
pointvalue.Changed:connect(function()
pointl... | 38605 | 1 | 40928 | 0 | 25643017 | Pejorem | 164 | 2017-01-01 09:48:46 | <p>Haven't tested it myself but I'd imagine it's the call for tonumber(pointlabel.Text) being a nil value
Of which you can't perform arithmetic on a nil value. I guess simply change pointLabel.Text to a default value upon starting the game or adding the player to the game. Or upon creating the GUI</p>
|
1 | CFrame basics and how to use it? | 404984521 | Block_manvn | 395 | 2020-01-30 09:44:59 | <p>I'm try to learn CFrame in Roblox Developer Site but got nothing, so i'm here for asking you guy about CFrame.</p>
| 93832 | 2 | 86694 | 2 | 97773570 | Gameplay28 | 134 | 2020-01-30 12:54:46 | <p>I'm going to give you a small explanation here.</p>
<p>CFrame stands for CoordinateFrame.</p>
<p>You can use CFrams to change positions of Parts in three dimensional space.</p>
<pre class='brush: lua'>Part.CFrame = CFrame.New(89,34,13)
</pre>
<p>If you wanted to add position to a CFrame, you would do so using Vector... |
1 | how to make a wall that you can walk through when you have 1000 currencies? | 454500642 | sebulba2009 | 5 | 2021-04-06 18:36:27 | <p>How to make a wall through which you can go only if you have the right amount of currency (currency added every 5 seconds) (script) please because the youtube guides did not work for me</p>
| 122087 | ||||||||
0 | How would I make a keybind script for an animation? | 32285070 | MeOwnYouNoobs | 16 | 2020-06-09 07:48:29 | <p>I want to add animations to my game, but I need permanent keybinds. Im not sure how to script these though, any tips would be extremely helpful.</p>
| 105842 | 2 | 97496 | 0 | 58729054 | Dovydas1118 | 1495 | 2020-06-09 11:32:26 | <p>Use UserInputService. UserInputService allows you to use keybinds to perform functions (such as loading animations.) I'll show you a part of it:</p>
<pre class="brush: lua">--This has to be a local script due to server scripts not accepting UIS
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(f... |
0 | How would I change a SoundID using a textbox entry? | 1193188919 | Hayz_ll | 2 | 2020-03-16 21:23:45 | <p>So I have a GUI in which a player can enter their sound ID for it to change the sound of the horn. However, it isn't working and is only changing the sound ID to the "rbxassetid://" part and doesn't include what the user entered. Here is my script:</p>
<pre class='brush: lua'>repeat wait() until script:FindFirstAnce... | 96228 | 3 | 88932 | 0 | 74087102 | Ziffixture | 5654 | 2020-03-16 22:24:40 | <p>Your issue is the fact that you declared <code>musicID</code> as a constant; meaning that it will capture the state of which it was in after immediately being loaded, and will not reconfigure to any new input. Instead, you should capture the Text upon the <code>MouseButton1Click</code> signal:</p>
<pre class='brush:... |
0 | Where would I begin to make deformable snow? | 195847367 | Zeta_Dev | 34 | 2021-08-08 03:21:29 | <p>So I saw a video on youtube that someone made deformable snow and I wanted to know where would I start to make it? <a target="_blank" href="https://www.youtube.com/watch?v=LKnpitDeYhE">Video</a>
I think it has something todo with eroding terrain around the player's lower leg.</p>
| 126234 | ||||||||
0 | How to make a script that goes "if part.Size is Higher than its original size, then print("Text")"? | 212919172 | Oxar12 | 0 | 2022-09-10 22:06:13 | <p>I tried several ways and even researching, and I couldn't find the solution. Is there anyway to make that type of script?</p>
| 131580 | ||||||||
0 | How to vertically lock the camera angle, but not horizontally? | 89689582 | Chezyii | 0 | 2023-02-08 23:10:08 | <p>I'm trying to make a dungeon game where the camera of a player can't zoom in or out (I've already done that part) but I need to make it so shift lock is always enabled (I can probably do that on my own as well)...</p>
<p>But I'm trying to make it so the player's camera angle can move left/right but not up/down, kind... | 133042 | ||||||||
0 | How come when I have more than one DevProduct? | 46882042 | Skenderbeu98 | 0 | 2014-05-08 17:48:17 | <p>When I have one developer product script in my game, they buy it and get credits, and it works. Then when I put 2 or 3 for different developer products, only one works..</p>
| 4525 | ||||||||
1 | How do you check if a Character is walking? | 16227427 | ASCIIaliens | 20 | 2015-03-15 19:36:25 | <p>I know that if you check a Humanoid's state you can see if a Character is Jumping or Falling, but when a Character is not moving it still counts them as Running/RunningNoPhysics.</p>
<p>BONUS QUESTION: What is the difference between Running and RunningNoPhysics?</p>
| 15796 | ||||||||
0 | Is there a way to move the default ROBLOX chat? | 583149822 | Ramshackles | 14 | 2018-06-23 00:08:15 | <p>I want to lower the default chat instead of having it be in the top left corner, but I'm not sure how to do this.</p>
<p>Is this possible, or would I have to make my own custom chat entirely?</p>
| 60951 | ||||||||
0 | Help! I Have a problem! My sword only deals damage once. What happened? | 339941400 | Superboybull2 | 2 | 2020-06-11 16:55:58 | <p>Ok, So. My sword only does damage once, When I swing it again, It doesn't do any damage any more. Here is my script.
Script:</p>
<pre class='brush: lua'>script.Parent.blade.Touched:connect(function(p)
if script.Parent.CanDamage.Value == true then
script.Parent.CanDamage.Value = false
p.Parent.Humanoid:TakeD... | 106105 | ||||||||
0 | How would I make my leaderstats reset on player death? | 107699267 | Puffyjasonrocks84 | 32 | 2022-05-05 00:48:14 | <p>I have a leaderstats for time called "Timex" that I want to reset when the player dies here is my leaderstats script:</p>
<pre class='brush: lua'>local DataStoreService = game:GetService("DataStoreService")
local myDataStore = DataStoreService:GetDataStore("myDataStore")
game.Players.PlayerAdded:Connect(function(pla... | 129914 | 1 | 117370 | 1 | 1715522570 | BeautifulAuraLover | 371 | 2022-05-05 16:09:39 | <pre class='brush: lua'><br />local function onPlayerAdded(plr)
local con1
plr.CharacterAdded:Connect(function(char)
repeat wait() until char.Parent and char:FindFirstChild("Humanoid")
con1 = char.Humanoid.Died:Connect(function()
for i, v in pairs(plr.leaderstats:GetChildren()) do
... |
1 | Aspiring devloper has problems with a script. Any ideas? | 205456885 | SuperBeeperman | 30 | 2018-04-19 23:49:45 | <p>inside a p:art called "Spirit" there are two scripts:</p>
<p>one Supposedly should give EXP when touched by the "WaterEssence":</p>
<p>P.D.: "EXP" is in a folder named "leaderstats" inside the character</p>
<pre class='brush: lua'>local ATM = script.Parent
ATM.Touched:connect(function(entity)
print(entity:GetFu... | 57107 | 1 | 55805 | 1 | 451528150 | 522049 | 152 | 2018-04-20 00:31:33 | <pre class='brush: lua'>local ATM = script.Parent
ATM.Touched:connect(function(entity)
print(entity:GetFullName())
if entity.Parent.Name == "WaterEssence" and game.Players:FindFirstChild(entity.Parent.Parent.Name) then
-- local Man = entity.Parent.Parent.Parent
local RealMan = game.Players:Find... |
1 | Why is my for loop not using the wait function? | 1527823663 | kickoff127 | 103 | 2023-02-04 02:13:08 | <p>I tried to making a thing where when you click a button it makes your clicks leaderstats go up by 1. I can click fast, so i wanted a cooldown on 1 or 0.5 seconds. Here is my script:</p>
<pre class='brush: lua'>for number = 1, 1 do
script.Parent.MouseButton1Click:Connect(function()
game.Players.LocalPlaye... | 133008 | 1 | 120126 | 1 | 559514967 | T3_MasterGamer | 2189 | 2023-02-04 04:41:09 | <h2>Solution</h2>
<p>I recommend using a <a target="_blank" href="https://create.roblox.com/docs/scripting/scripts/debounce">debounce</a> instead. A <a target="_blank" href="https://create.roblox.com/docs/scripting/scripts/debounce">debounce</a> is like a toggle of whether you should do this or not. It is crucial if yo... |
0 | Expected identifier when parsing expression, got Unicode character U+feff Line 11? | 1122312651 | totosimamora608 | 61 | 2022-03-07 10:53:42 | <p>Error:
Workspace.Part.Script:11: Expected identifier when parsing expression, got Unicode character U+feff</p>
<p>Script:</p>
<pre class="brush: lua">local debounce = false
game.Workspace.HealingPad.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
if not debounce then
debounce = true... | 129222 | ||||||||
0 | Can someone give me a full list of all the services? | 244452876 | JesseSong | 3916 | 2019-08-18 19:24:58 | <p>[This question has been closed By ScriptGuider]</p>
<p><strong>Edit</strong></p>
<p>Services are anything inside of the workspace
Services are essential for everything in the workspace this includes player added event etc</p>
| 86095 | ||||||||
0 | local variable table error? | 1750439438 | mainmodul | 30 | 2021-02-23 15:58:32 | <p>Hi, i'm making an Anti Cheat for anything but this isn't working:</p>
<p>local blacklisted_test = {'test1','test2'}</p>
<p>for _,v in pairs(game.Players.LocalPlayer.PlayerGui:GetChildren()) do
if v.Name == blacklisted_test then
v:Destroy()
end end</p>
<p>How can i fix it?</p>
| 120567 | ||||||||
0 | BrickColor not working properly? | 302188 | Dom2d2 | 35 | 2014-04-19 02:29:30 | <p>Hey, I'm having a small issue.</p>
<p>This (Snippet from larger script):</p>
<pre class="brush: lua"> color = math.random(1,64)
p.Color = BrickColor.new(color)
</pre>
<p>This is the error I get, how can i get this to work?</p>
<blockquote>
<p>21:26:50.081 - Workspace.Script:7: bad argument #3 to 'Color' (Colo... | 2802 | ||||||||
0 | Date store not reading async commands? | 651311357 | guy56890 | 0 | 2021-02-21 11:47:18 | <p>I have been trying to learn data store from many articles and tutorials. I always follow along, remember to switch on HTTP services for studio, and write everything exactly as they tell me to. Though when they get a saved result, I don't. I've tried putting print statements in my code, and I've found that it skips t... | 120456 | ||||||||
0 | Please help with a script about changing teams while a player dies. Is it possible ? | 12114108 | s08qz6kpm2ofdqwg6n9n | 0 | 2023-01-11 21:56:26 | <p>Make a script for Roblox Studio when a player is in team "Alive" and dies then he is automatically in team "Dead". Thank you for answers.</p>
| 132810 | ||||||||
0 | How to complete path when Square Brackets and Double Quotation marks are given? | 473052976 | nkminion | 21 | 2019-11-22 12:56:09 | 90339 | 2 | 83752 | 0 | 965397388 | programmerHere | 371 | 2019-11-22 16:54:22 | <h1>Use square brackets again.</h1>
<pre class='brush: lua'> game.StarterGui.ScreenGui.Settings["Now Playing"]["Song name"].Text = "Song name"
</pre>
<p>But to avoid this, since it can be messy, just remove the spaces and name it <code>NowPlaying</code> and <code>SongName</code>.</p>
<p>But this code is far from perfec... | |
0 | Change the design of the First Person Mode into a Digital Video Camera Recorder? | 55205809 | SilentProtagonist | 6 | 2014-04-16 14:09:16 | <p>If the player is in First Person Mode (Or just make a script that force it to use it), it would have the Digital Video Camera Recorder style. Like the horror games nowadays. I know its possible but I don't know how to make it...</p>
| 2152 | ||||||||
0 | Mouse.hit Gui not going away when looking away from object ? | 1032618075 | FantasticFrontierGuy | 33 | 2021-10-04 11:24:02 | <pre class='brush: lua'>local UIS = game:GetService("UserInputService")
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
UIS.InputChanged:Connect(function()
if mouse.Target then
if mouse.Target.Interact then
script.Parent.Enabled = true
else
script.Pare... | 127792 | ||||||||
0 | How can I make a seat where you can't get out by jumping? | 1457377739 | RasbaKolaLegend | 0 | 2021-10-24 12:10:35 | <p>So I tried making this script by making local player jump power to be 0 but It didn't work
This is the script I tried to make</p>
<pre class='brush: lua'>game.Players.LocalPlayer.Character.Humanoid.JumpPower = 0
</pre>
<p>So please find a solution for me!
btw I'm not necroposting
since this method no longer works
ht... | 127961 | ||||||||
0 | Is it possible to make some line of code fire WHILE a part is being touched? | 1109192997 | Afterineta | 2 | 2022-09-13 00:17:56 | <p>I'm trying to make a spleef like game and in it i want an ice mechanic where you step on it and it would crack, and then it would eventually break. I use the .touched event to know when a player is touching the part. But that only fires when the player BEGINS to touch the part. I need it to fire while the player is ... | 131611 | ||||||||
1 | How do you see how much you hit an player for? | 539909602 | Retallack445 | 24 | 2020-09-19 00:43:13 | <p>How did roblox Jail Break make the combat system like when you hit an player with a gun it shows how much you hit the player for. is there an already made model for this if not how would you do it?.</p>
| 113322 | 2 | 104049 | 0 | 73170429 | imKirda | 1082 | 2020-09-19 12:00:47 | <p>And to check how much for did they hit you can try this:</p>
<pre class='brush: lua'>local oldHumanHealth = human.Health
human:TakeDamage(50)
local currentHealth = human.Health
local damageTaken = currentHealth - oldHumanHealth
</pre>
|
1 | :ServerScriptService and Serverstorage are the same thing? | 244452876 | JesseSong | 3916 | 2019-08-05 16:57:58 | <p>Is ServerScriptService and ServerStorage the same the same thing?</p>
| 85154 | ||||||||
1 | Get "min" and "max" Vector3 Values from a Region3 Object? | 32865386 | maxbd | 44 | 2019-12-04 00:08:52 | <p>How would you go about getting the <code>min</code> and <code>max</code> Vector3 values from the existing properties of a Region3 data-type value?</p>
<p>So, I've recently stumbled across this question. We can create Region3 objects by passing a <code>min</code> Vector3 object and a <code>max</code> Vector3 objects ... | 90936 | ||||||||
0 | Can you equip two tools at the same time? | 14356816 | dragonkeeper467 | 453 | 2015-02-03 20:35:59 | <p>How would you go about with equipping two tools at a time? Is it possibly to equip two tools at a time or can you only equip one tool object with the two tools inside? I need a way to equip two swords or a sword and a shield at the same time.</p>
| 14723 | ||||||||
0 | Only plays once? | 16686825 | drahsid5 | 250 | 2014-03-02 10:54:34 | <p>I made a script that has a GUI animation when my fake health integer <= 0
It works once, perfectly then when the value reaches 0 again, it doesn't even make the GUI visible.
Anyone know why?</p>
<pre class="brush: lua">local World = script.Parent.Parent.Parent.InWorld
local DeathMessages = {
"You failed..."
... | 434 | ||||||||
0 | How do you make a gamepass so when a player buys it they wear a hat when they join the game? | 404712119 | DataCordz | 0 | 2020-08-01 03:01:01 | <p>Im trying to make a gamepass that makes it when a player buys it they wear a hat when they join the game but i cant get around his problem i tried fixing the script but i think i just made it worse since im a beginner at scripting.</p>
<pre class='brush: lua'>local MarketPlaceService = game:GetService('MarketplaceSe... | 110435 | ||||||||
0 | How to make a pop up GUI? | 33256945 | RFYassine | 15 | 2014-04-16 11:53:57 | <p>How do I make a pop up GUI, so when I go through a door a gui comes up saying "Level 1" then goes off 5 seconds later?</p>
| 2127 | 2 | 2825 | 1 | 56710551 | Archonious2 | 160 | 2014-04-16 12:01:49 | <ol>
<li>Create an event on the door Part to detect it being touched. E.g. Workspace.Door.Touched</li>
<li>Then when that is detected create the GUI in the player's PlayerGui, by starting off with a ScreenGui, then adding a Frame and a TextLabel,</li>
<li>Make it wait 5 seconds with wait(5) and then destroy it using th... |
0 | I cant see what ive done wrong with this toggle collision script? | 241458608 | AnAverageRobloxianYT | 0 | 2022-08-04 13:31:46 | <p>I cant see what ive done wrong with this script. Its meant to be a Can-Collide script for a TAS GUI im making for Flood Escape 2. Can Someone help me correct this?</p>
<p>```local UserInputService = game:GetService("UserInputService")</p>
<pre class="brush: lua"> input.UserInputType == Enum.UserInputType.keyboard th... | 131096 | ||||||||
0 | HAS ANYONE BEEN EXPERIENCING THIS ERROR? | 1406016964 | AMissingKid | 4 | 2022-06-22 07:55:38 | <p>everytime you upload an audio on roblox it just gets an error that says "data.roblox.com refused to connect" i need help on this.</p>
| 130456 | 1 | 117799 | 0 | 1961959172 | imnotaguest1121 | 89 | 2022-06-22 13:15:11 | <p>Try to Make Sure You're Using a Supported Browser. Make sure you are using the most updated version of your browser to Play Roblox. If you are having issues playing with your current browser, please try playing on a different browser, such as Firefox or Chrome.</p>
|
11 | Player Added (Instance Created) help? | 16826035 | YellowoTide | 1992 | 2014-04-19 03:25:00 | <p>I have this script:</p>
<pre class='brush: lua'>local player = script.Parent.Parent
game.Players.PlayerAdded:connect(function(player)
local player = script.Parent.Parent
Instance.new("SpotLight", player)
player.Head.SpotLight.Name = ("Flashlight")
wait()
player.Head.FlashLight.Angle = (120)
p... | 2809 | 1 | 3884 | 4 | 25290541 | ultrabug | 306 | 2014-04-19 03:28:57 | <pre class='brush: lua'>game.Players.PlayerAdded:connect(function(player)
message=Instance.new("Message")
message.Text=player.Name.." has entered the game!"
message.Parent=game.Workspace
wait(5)
message:Destroy()
end)
</pre>
|
1 | Whats the best way to create and save a value without leaderstats? | 680620891 | CosmicIsGod | 139 | 2020-06-08 23:53:19 | <p>I don't have an issue, but just a general question. The way I've done this up until now is by just inserting a number value but not putting it into leaderstats. For example, a backpack in a simulator for how much it can hold do I just insert a number value? I just want to know if there is a better way to do this. Th... | 105804 | 1 | 97457 | 1 | 108425597 | chasedig1 | 115 | 2020-06-08 23:57:14 | <p>Create a folder in the player, call it Stats. This will be the folder for the things they have, backpack capacity, how much currently in their backpack, etc.</p>
<p>Also, don't use NumberValues for backpacks. Instead, use IntValues. NumberValues have floating point errors, and extra precision you don't need!</p>
|
0 | How to prevent players from picking up more than 1 tool? | 115589511 | superbubba2020 | 6 | 2021-05-04 02:25:16 | <p><a target="_blank" href="http://"></a>ibb.co/Tt3V5Xq</p>
<p>I have a script that let's you pick a tool up from the replicated storage by holding e on a model.
but you can get tons of that tool if you keep repeatedly pressing e, which can give you more than that 1 tool. i want to make it so you only can have 1 of tha... | 123074 | 2 | 112154 | 1 | 291424954 | NGC4637 | 245 | 2021-05-04 03:19:10 | <p>heres my take on the script. Put this script (not local script) inside the KeyPart</p>
<pre class='brush: lua'>local ReplicatedStorage = game:GetService("ReplicatedStorage")
local KeyTool = ReplicatedStorage.Keycard
local KeyPart = script.Parent
local Prompt = KeyPart.ProximityPrompt
Prompt.Triggered:Connect(functio... |
0 | ERROR: Attempt to connect failed: Passed value is not a function? | 51274918 | yodaxvader | 0 | 2018-02-11 23:27:27 | <p>It's a pet tool. It gives me an error: Attempt to connect failed: Passed value is not a function</p>
<p>local Tool = script.Parent
local FluffyHandle = Tool.Handle</p>
<p>local FluffyInstance = nil</p>
<p>local Character = nil</p>
| 53577 | ||||||||
0 | Knockback not exactly working? | 264630904 | DriBowser | 55 | 2022-07-14 16:25:41 | <p>hi, so basically i have a knockback system for a bat i made, but the knockback only seems to work for a split second, and even though ive tried like adding waits, it either does it at the very start, or just doesnt do it at all.
Help would be appreciated</p>
<p>Here is the script that gets activated when a remote ev... | 130789 | 1 | 118088 | 1 | 1961959172 | imnotaguest1121 | 186 | 2022-07-14 18:16:49 | <p>I think I found your problem</p>
<p>I saw:</p>
<pre class='brush: lua'> HitTorso.Velocity
</pre>
<p>In your code and Velocity Is Deprecated meaning It will no longer work on new work</p>
<p>I decided to put this script Inside of a part which knockbacks players away from It:</p>
<pre class='brush: lua'>script.Parent.... |
0 | How to disable "Kicked due to unexpected client behavior"? | 1007890826 | nc2r | 117 | 2019-11-14 22:06:52 | <p>I am using Grapejuice to run Roblox on Linux and when I try to use the Roblox player, I always get kicked for unexpected client behavior. I want to disable this for me only. Roblox studio works just fine under Grapejuice, but I want to disable getting kicked by unexpected client behavior.</p>
<pre class='brush: lua'... | 90020 | 2 | 83467 | 0 | 24274153 | SoftwaveZero | 15 | 2019-11-14 22:19:12 | <p>I believe this is more of a client issue, and yes, unfortunately, you might have to use a OS that Roblox was programmed to support because it doesn't support Linux. This isn't fixable with scripting.</p>
|
3 | Who clicked the click detector? | 9421733 | gdunn2 | 54 | 2014-12-24 05:26:03 | <p><strong>I was just wondering if there was a way to find out who clicked on the click detector?</strong></p>
| 13578 | ||||||||
0 | How to change skybox (locally) after touching a block? | 157496457 | Aesopxx | 0 | 2021-10-20 01:42:59 | <p>I want to create another area in the map for my game, but that area is always night so I need a separate skybox. I think it's easier to make the skybox change if I touch a block, but if there's a different method that works better please tell.
Every tutorial I've found for this doesn't work for some reason, maybe be... | 127925 | ||||||||
1 | How do I make leaderstats not go below zero? | 463758281 | Guest_99866 | 7 | 2022-06-21 01:43:17 | <p>In the shop when you buy something, if you dont have enough money instead of stopping you the leaderstat amount will go below zero, how do I stop this?</p>
| 130432 | 1 | 117768 | 0 | 1674805834 | Black_Magic2533 | 58 | 2022-06-21 05:06:13 | <p>Im assuming for your script you did something a little like this</p>
<pre class='brush: lua'>script.Parent.MouseButton1Click:Connect(function(player)
player.leaderstats.stat.Value -= 30 -- 30 is just a placeholder value
-- whatever the code is for when its bought
end)
</pre>
<p>Instead you should do</p>
<pre class=... |
1 | how to fix a datastore for leaderstats? | 1603550530 | verysweatyperson | 8 | 2021-04-25 17:06:26 | <p>Hello, I am attempting to save data in my game but the code is not working. I'm not sure of the problem and I'm pretty sure many others are having the same problem. My code is below. ~~~~~~~~~~~~~~~~~
local DataStoreService = game:GetService("DataStoreService")
local CoinsDataStore = DataStoreService:GetDataStore("C... | 122798 | 2 | 111883 | 1 | 94006350 | BulletproofVast | 385 | 2021-04-25 17:20:54 | <pre class='brush: lua'>local DataStoreService = game:GetService("DataStoreService")
local CoinsDataStore = DataStoreService:GetDataStore("CoinsDataStore")
game.Players.PlayerAdded:Connect(function(player)
local Folder = Instance.new("Folder",player)
Folder.Name = "leaderstats" -- dont need Folder.Parent = play... |
0 | How do I keep the players inventory when they die? | 60909685 | Hoboful | 0 | 2014-05-18 07:09:03 | <p>I've got like a shop and every time I buy something from it and die it doesn't respawn with me. So I was wondering how do I keep the players inventory when they die? (I know about StarterGUI) But this is a shop where you buy stuff.</p>
| 5027 | ||||||||
10 | ?Understandable Lua Tutorial - Tick() function [MEDIUM]? | 467337150 | XDvvvDX | 186 | 2020-04-20 11:58:34 | <p>Hello! Today I will teach about the Roblox tick() function.</p>
<p>1) So, what is tick()?
Tick is a function that shows the amount of secounds that have passed since January 1st 1970, yes, it's pretty weird and it sounds useless but keep reading and we'll explain more.</p>
<p>2) So how can tick() be used?
Tick has a... | 99989 | ||||||||
0 | "Player" parameter | 52167760 | Bloxks | 30 | 2014-02-19 21:39:15 | <p><strong>Whoops, didn't see that I even used the parameter, however, you guys still helped me with it. Thanks and sorry for a unneeded question.</strong></p>
<p>I'm having trouble with the player parameter. That means that when I ever use the player parameter, I get a error that "Player" is not a valid object. Is thi... | 127 | 3 | 246 | 0 | 8895155 | truefire2 | 75 | 2014-02-19 21:43:02 | <p>Define the player.</p>
<p>In a local script, you can get a player with game.Players.LocalPlayer.</p>
<p>In a normal script, if you're using a touched part, you can use :GetPlayerFromCharacter, or do the long way script.Parent.Parent....</p>
<p>You can also use the PlayerAdded and Player Removing Event.</p>
<pre clas... |
0 | Where can I learn Mathematics for making projectiles, etc.? | 101726627 | cherrythetree | 95 | 2020-11-21 23:39:23 | <p>Hello there! This question is not about an error in my script since I am already familiar with Lua, especially OOP. But I have the last problem with scripting, which I have less practice with Mathematics. I'm going to continue developing my Roblox magic game, and this would heavily impact how I script projectiles si... | 116129 | 1 | 106569 | 1 | 9542689 | Vathriel | 477 | 2020-11-21 23:45:15 | <p><a target="_blank" href="https://www.khanacademy.org/">Khan Academy</a> is a really good option, they have courses ranging from very introductory mathematics to very advanced mathematics, and they also have physics courses.</p>
<p>In addition there is the wonderful post by EgoMoose on the devfroum <a target="_blank"... |
0 | How would you find and return a player with only part of their name? | 2638787 | Superburke1 | 130 | 2014-02-17 03:21:58 | <p>For example, typing /kill su would kill the user Superburke.</p>
| 19 | 3 | 40 | 0 | 23476243 | MarkOtaris | 241 | 2014-02-17 03:30:42 | <p>The <code>find</code> function of the string library can be used to check if a string contains another string and you can make the check not case sensitive by using the lower case versions of both strings.</p>
<p>To check if the string <code>source</code> is part of the name of a player <code>player</code>, you can ... |
0 | How would I make it so when the target is not close enough it goes to a certain part? (zombie ai) | 1723050796 | RenDevelopment | 15 | 2020-06-29 21:40:35 | <p>I know nothing about stuff f like this, so help would be appreciated :)</p>
<p>I am making a zombie that goes to a certain part when it has no target
Note: most of this script is not mine, some of it is though
Part of the script:</p>
<pre class='brush: lua'>local myHuman = script.Parent:WaitForChild("Humanoid")
loca... | 107785 | ||||||||
0 | is there a way I can disable a players movements in a server script? | 1574810503 | therealjimmybob | 22 | 2022-01-04 17:46:01 | <p>I have already defined the player as plr, I want it to disable the movements if a certain part is red, but when it turns green I want the players movements to be enabled again</p>
| 128691 | 2 | 116533 | 0 | 158811 | TGazza | 1336 | 2022-01-04 18:32:55 | <p>Just a mock-up code (untested since I'm on my phone). But the Guts of this code should be what you want.</p>
<p>Combining Both comments from <code>StayMarkus</code>(WalkSpeed) and <code>BearGamesZ</code>(HumanoidRootPart.Anchored)</p>
<p><code>HumanoidRootPart.Anchored</code></p>
<pre class="brush: lua">local Player... |
0 | Protecting a table in _G? | 94802373 | fireboltofdeathalt | 118 | 2017-03-02 07:02:01 | <p>Okay so, I am using _G for use so that I (and or other people) can use my admin through another script.</p>
<p>I've set a metatable in to it and a loop to prevent people from changing it, but.
Is there any way to fully protect the table from people overriding?</p>
<p>I've done this:</p>
<pre class='brush: lua'>__ind... | 40664 | 2 | 42650 | 3 | 386992 | BlueTaslem | 18071 | 2017-03-02 07:39:30 | <p>If you are wondering whether or not you can protect a key in <code>_G</code>, the answer is no, you can't. Use ModuleScripts instead.</p>
<p>There is basically no good reason to use <code>_G</code> for anything whatsoever and scripts wantonly interfering with each other is a good reason not to use it.</p>
<hr />
<p>... |
0 | Trying To Make A Expandable Part Is Just Broken? | 1376520512 | Magicdevice3 | 58 | 2021-10-02 08:40:48 | <p>I Have A Script In The StarterGui Which Sizes A Block When Dragged But Instead Of Just Doing It Once It Rapidly Expands Even When I Let Go Of The Mouse Button!</p>
<p>Here Is The Script</p>
<pre class='brush: lua'>script.Parent.MouseDrag:Connect(function(face,Distance)
if face == Enum.NormalId.Top then
p... | 127779 | ||||||||
0 | [CLOSED]Detect how much time has passed since input? | 371637657 | ssgmalachi | 52 | 2021-04-29 19:57:38 | <p>Hello! I am making a combat script, where you can throw 3 punches until your combo resets. I have made this many times before, but I want to implement something new into it. I want to make the combo counter reset after a certain number of seconds have passed. I'm not too good with tick(), so I don't understand how t... | 122939 | ||||||||
0 | Question about the best way to go about serverside and client side in a place system? | 1017846707 | Overseer_Prince | 174 | 2022-11-17 00:18:52 | <p>So let me explain</p>
<p>I have a placement system ready</p>
<p>now I have 2 choices when doing server side and client side connections</p>
<p>When the player builds and places something I can fire a remote event to place it right away</p>
<p>the second option which I think is better is</p>
<p>after the player has f... | 132297 | ||||||||
0 | How do I move player characters into a single folder? | 35709145 | XxTrueDemonxX | 362 | 2022-09-04 18:04:06 | <p>I had to take a break for a bit before coming back to scripting when I noticed one of my old scripts doesn't work anymore that would lump all characters into a single folder.</p>
<pre class='brush: lua'>game:GetService("Players").PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
... | 131508 | ||||||||
0 | How would i detect when a gui tween is done? | 479864737 | COOLGUY16T | 37 | 2021-02-07 17:46:55 | <p>So I'm trying to make an animated background for my game menu and i need to detect when the background is done tweening. I tried doing this but it kept erroring:</p>
<pre class='brush: lua'>local Patterntween = script.Parent:TweenPosition(
UDim2.new(0.509, 0,1, 0),
Enum.EasingDirection.In,
Enum.EasingSty... | 119778 | 1 | 109329 | 1 | 143096970 | Rayguyban2 | 76 | 2021-02-07 18:14:10 | <p>I think you have to check the status on it, here is the code to fix it.</p>
<pre class='brush: lua'>if Patterntween == Enum.TweenStatus.Completed then
print("The tween completed uninterrupted")
end
</pre>
|
0 | Can you help me do this it says unable to cast instance to token? pls help! | 1098704750 | Trampyling | 36 | 2020-11-15 15:46:40 | <pre class='brush: lua'>print(game.TextService:FilterStringAsync("hello",game.Players.Trampyling,game.Players.Trampyling))
</pre>
| 115813 | 1 | 106315 | 1 | 443643048 | Soban06 | 410 | 2020-11-15 17:03:51 | <p>3rd parameter must be either Enum.TextFilterContext.PrivateChat or Enum.TextFilterContext.PublicChat or you can leave it blank and let the Roblox deal with it. You would want to leave it black unless you’re making your own chat system separate from Roblox’s chat service.</p>
|
3 | How do you use "RenderStepped()"? | 37233483 | magmacute2099 | 5 | 2014-09-07 00:07:38 | <p>I'm curious on how to use <em>RenderStepped()</em> because
of this game that fascinates me:
<a target="_blank" href="http://">http://www.roblox.com/Cold-Fusion-The-Power-Of-RenderStepped-place?id=2169503</a></p>
<p>Plus, <strong>I can't really understand the ROBLOX Wiki and can't find it in the scripting glossary. H... | 10648 | 1 | 13514 | 9 | 14975034 | xImmortalChaos | 565 | 2014-09-07 00:14:52 | <p>RenderStepped is like a wait(0.0001) thing. So that means it calls that function like every mili-second, So it can be used for a replacement of while wait() do.</p>
<pre class="brush: lua">game:GetService("RunService").RenderStepped:connect(function()
--Code
end)
</pre>
|
0 | My RPG Monster will only follow other monsters, but not me? | 18976509 | maxi66666 | 6 | 2018-08-22 18:10:12 | <p>So I've made a RPG Mob, but I can't get it to follow me, only other monsters?</p>
<p>My Goblin-Monster's Humanoidname = "Human"
And the white one's Humanoidname is = "Humanoid"</p>
<p>https://gyazo.com/c8e06fce383a49a01ef82837de9395f1</p>
<p>My Goblin will only follow other "Mobs" with their Humanoid also named "Hum... | 66005 | 2 | 63753 | 1 | 721604356 | MarkusMape | 22 | 2018-08-22 18:53:59 | <p>This is because you have R15 avatar type probably. Go to your place configuration and change your game Avatar Type to "Morph to R6". OR if you want to keep your avatar type R15, then you need to switch all Torso in your script with UpperTorso.</p>
|
0 | Help please could someone try this? | 18369403 | Lem0nzz | 5 | 2014-04-16 13:45:36 | <p>So I was thinking of a msg:lower() script, where if the player were to say "MainMenu/", then a GUI would open. As in the players GUI will be Visible, after being Unvisible. Any Ideas??</p>
| 2150 | ||||||||
0 | How do I make this variable work correctly? Putting a number manually works. | 37092313 | tim458458 | 29 | 2023-03-03 23:03:36 | <p>Hello. I have been trying to make a script clear your accessories and then load in your current roblox avatar accessories.</p>
<pre class='brush: lua'><br />local player = game.Players:FindFirstChild(username)
local playeruserid = player.UserId
print(playeruserid)
print(type(playeruserid))
clearAccessories(character... | 133139 | ||||||||
0 | FireAllClients only firing to one client? | 641077570 | Scryptio | 64 | 2022-05-02 00:32:36 | <p>I have an Intermission GUI that is activated through a remote event, I used FireAllClients but can't seem to figure out why it's only firing one client. (See image below)</p>
<p>https://imgur.com/a/aBk0vni</p>
<p>Server:</p>
<pre class='brush: lua'>-- Variables --
local rep = game:GetService("ReplicatedStorage")
loc... | 129887 | ||||||||
1 | Can you check if a object is inside a certain folder? | 226832508 | MattVSNNL | 614 | 2021-05-09 14:50:39 | <p>I made this ball that you can throw and I wanna code that if it touches something it will check if its an animal that touched it, Every animal will be inside an Animals folder, but I wrote a small code and it doesn't work, I researched for 30 minutes and got no result, I also have no errors, Can anyone help me?</p>
... | 123282 | ||||||||
1 | Invalid argument #2 to random, interval is empty, but it's not? | 103833540 | deeskaalstickman649 | 388 | 2020-07-23 14:27:14 | <p>I understand the error, it's saying the 2nd argument is smaller than the 1st. However, the first argument has 8 digits whilst the 2nd argument has 11 digits.
Here is the math.random()</p>
<pre class='brush: lua'>local torque = Vector3.new(math.random(30000000, 12500000000), math.random(30000000, 12500000000), math.r... | 109772 | 2 | 100898 | 1 | 66932798 | moo1210 | 587 | 2020-07-23 14:56:36 | <p>Yep, are you are getting an integer overflow. There is not much you can do about this other than to remove an 0.</p>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.