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 | Why will a piece of text not change if a value linked to it via script changes? | 461604490 | 2Loos | 145 | 2020-08-19 23:22:29 | <p>What I would like to know:
A. Why this happens
B. Ways to fix it
C. Is there anything I should remember about changing text using constantly changing values</p>
<p>My Script:</p>
<pre class='brush: lua'>local ServerStorage = game:GetService("ServerStorage")
local Players = game:GetService("Players")
game.Players.Pla... | 111727 | 2 | 102562 | 0 | 1313174322 | tylerisyummy | 35 | 2020-08-19 23:44:40 | <p>You are only changing the text label text once, which is when the character is added. You need to make it so your text changes whenever the value changes, for instance...</p>
<pre class='brush: lua'>killsVal.Changed:Connect(function(NewValue)
killsVal.Value = kills
end)
deathsVal.Changed:Connect(func... |
0 | why is Flora defined, but still nil? | 85750749 | Chronomad | 180 | 2018-01-15 12:02:43 | <p>Flora is defined, but when I try to call it I get nil. Any ideas?</p>
<p>Client</p>
<pre class='brush: lua'>wait()
ReplicatedStorage = game:GetService("ReplicatedStorage")
floraEvent = ReplicatedStorage:WaitForChild("floraEvent")
flora = ReplicatedStorage:WaitForChild("Flora")
function generateFlora(targ,node)
... | 52164 | 1 | 51687 | 1 | 286997127 | TheDev321 | 37 | 2018-01-15 12:11:10 | <p>Your code is going like this, it seems that your generate function cant check the variables targ, and node.</p>
<p>So now it will say:
local plant = flora:FindFirstChild("medBushA") (instead of)
local plant = flora:FindFirstChild(targ)
targ isn't a thing but you still trying to find it in your flora folder, and for ... |
4 | Why is coding efficiency so important? | 21204012 | EmperorTerminus | 55 | 2016-04-07 20:04:45 | <p>I understand that coding in as few lines as possible looks good to the coder but in reality what is the logic behind doing that when you can use simple methods of coding but just in a longer amount of lines? Does efficiency reduce lag or something, because I do not understand the reasoning behind it. Since I want to... | 29358 | 2 | 32772 | 14 | 39250676 | ScriptGuider | 5640 | 2016-04-07 20:16:36 | <h4>Just a side note: Lua is not an acronym and therefore shouldn't use all capital letters.</h4>
<h2>Readability vs Efficiency</h2>
<p>Some people say <em>efficiency</em> is more important, others will say <em>readability</em> is more important. I say they're both right. If you asked a computer, it wouldn't care what ... |
0 | Why can't I detect a change in a NumberValue if I change it in a localscript? | 102507276 | armacom03 | 15 | 2018-11-04 14:19:47 | <p>Hey Community!</p>
<p>I was working on a Roblox game, and I wanted to change a player's leaderstats from a local script. Here I have the script from the GUI text button:</p>
<pre class='brush: lua'>local Button = script.Parent
local player = game.Players.LocalPlayer
local char = player.Character
local price = 50
fun... | 70017 | 1 | 66842 | 0 | 214890411 | chexburger | 358 | 2018-11-04 18:45:19 | <p>Assisted through Discord.</p>
|
0 | Door being unlocked for all the clients, but not the server itself? | 92872759 | yayimstrongforever | 0 | 2020-10-18 01:38:35 | <p>I made a key and a door script. I'm using a local script that is in StarterPlayerScripts. But, when the key touches the door. It works fine, the only issue is that it unlocks for everyone. Making it so everyone can walk through the door. And also not only that, the server sees the door itself as closed.</p>
<pre cla... | 114498 | 2 | 105180 | 0 | 674490026 | SteelMettle1 | 394 | 2020-10-18 02:02:05 | <p>Everything you need to know is right here: <a target="_blank" href="https://developer.roblox.com/en-us/articles/Collision-Filtering-Team-Doors">Collision Filtering Team Doors</a></p>
|
0 | How do I fix this Discord webhook script so that embeds work? | 48081915 | AdministratorReece | 200 | 2017-07-10 11:17:16 | <pre class='brush: lua'> function errorpt:SendMessage(SV, EX)
error("An error occured, a report is being sent to the server!")
--- pretend the vairables work
print("Gathering infomation for error report...")
--------------- run the message to discord,
local message... | 45061 | 1 | 46052 | 1 | 116922675 | Kalissaac | 104 | 2017-07-10 17:51:24 | <p>Here's a Lua table version of the pure JSON needed by Discord webhooks.</p>
<pre class='brush: lua'>local message = {
username="username",
embeds={{
fields={
{value="1",name="2"},
{value="3",name="4"}},
title="5",description="6"}},
content="0"}
message = game:G... |
0 | why does my hand to gui not work (giving player tool from another player)? | 1781541169 | catsalt29 | 57 | 2020-09-14 02:40:44 | <p>code:</p>
<pre class='brush: lua'>game.ReplicatedStorage.Events.HandTo.OnServerEvent:Connect(function(player)
local co = player.Backpack.Tool:Clone()
local Playertogive = game.Players:FindFirstChild(player.PlayerGui.ScreenGui.TextBox.Text)
co.Parent = Playertogive
Playertogive.Tool.Parent = Playerto... | 113147 | ||||||||
0 | Why is my player billboard GUI not working? | 757628143 | 6zk8 | 95 | 2020-05-05 10:39:31 | <pre class='brush: lua'>game.Players.PlayerAdded:Connect(function(p)
local pname = tostring(p)
local prank = p:GetRankInGroup(5795473)
local body = game.Workspace:WaitForChild(pname)
local head = body.Head
local hum = body.Humanoid
hum.HealthDisplayDistance = 0
hum.NameDisplayDistance = 0
local block = ... | 101972 | ||||||||
0 | How do you make a specific player's chat show up in a GUI ? | 1696235625 | Cubispaghettis | 1 | 2023-01-21 03:15:16 | <p>So I am basically trying to make a concert game and when the player is on stage, I want that player that when he chats, his messages show up in a GUI. Here is the script for the GUI:</p>
<pre class='brush: lua'>local Remote = game.ReplicatedStorage:WaitForChild("UIRemote")
local player = game.Players.LocalPlayer
Rem... | 132903 | ||||||||
0 | TweenService:Create failed because Instance is null? | 130324008 | NascarDriverBurak101 | 2 | 2023-03-05 18:22:31 | <p>I have a simple tween script for a door I'm working on and it's giving me an error, but I do not know why. Any help is appreciated!</p>
<pre class='brush: lua'>TweenService = game:GetService("TweenService")
script.Parent.Open.Changed:Connect(function()
if script.Parent.Lockdown.Value == false then
if scr... | 133146 | 1 | 120233 | 0 | 215237638 | LikeableEmmec | 470 | 2023-03-05 18:58:57 | <p>I'm not <em>entirely</em> sure what the issue is because I cant see the hierarchy, but my best guess is theres no primary part or this door object is null, perhaps its cancollide off and anchored false? I don't know, but the "instance is null" error is usually caused by something that is nonexistant or has been dele... |
0 | How to make A "Drive For Money" script for my vehicle/racing game?? | 363894269 | repplayer | 2 | 2020-04-09 16:40:31 | <p>Hello! I am very new to programming and want to make a script that allows players to make money depending on the **speed **of the car. I also want it so that they **have to be in the vehicle **seat of the car. Thanks,
~~repplayer~~</p>
| 98635 | ||||||||
0 | Help with "onClicked" function? | 6886941 | painzx3 | 43 | 2014-04-26 15:44:10 | <p>How do I code a script so that if I click a weapon that I put in the workspace as a model it puts it into your backpack? I have the weapon with all the scripts in the lighting but all I have with my script currently is just the code below. Help?</p>
<p>local m = game.Workspace.Musket
function onClicked(mouse)
ga... | 3598 | 2 | 4991 | 1 | 37346832 | infalliblelemon | 145 | 2014-04-26 15:57:53 | <p>Firstly you have to have a ClickDetector in the weapon model. You also have to have a copy of the Weapon as a tool in Lighting.</p>
<pre class='brush: lua'>Weapon = Lighting.Weapon
script.Parent.MouseClick:connect(function Clicked(Player)
Weapon:clone().Parent = Player.Backpack
end)
--You'd put this under ClickD... |
0 | How do I check if a decal has loaded? | 652983286 | Loot_O | 42 | 2020-07-09 06:55:31 | <p>I've found a 4 year old scripting helpers post that says how to, but I have a problem.</p>
<blockquote>
<p>You can go this link to learn more information about it:
http://wiki.roblox.com/index.php?title=API:Class/ContentProvider/Preload
I hope this helps.</p>
</blockquote>
<p>Now, this is a part from the solution of... | 108593 | 1 | 99730 | 2 | 158811 | TGazza | 1336 | 2020-07-09 07:49:04 | <p>The PreloadAsync function loads multiple decals at once rather then the old Preload which in tern only loaded the decals 1 by 1</p>
<p>I've re-written the code from the PreloadAsync page from the page you specified, Hopefully its a little clearer on how to use the new Async preload function.</p>
<p>Note:
the table b... |
2 | It says "DataStore can't be accessed from client" how would I fix that? | 454606509 | Spiyder1 | 81 | 2020-05-10 01:38:47 | <pre class="brush: lua">local DataStoreService = game:GetService("DataStoreService")
local myDataStore = DataStoreService:GetDataStore("myDataStore")
myDataStore:SetAsync(script.Parent.Value)
</pre>
<p>there is an output error that reads, "DataStore can't be accessed from client", how would i fix that. the script is in... | 102548 | 2 | 94709 | 1 | 251936426 | youtubemasterWOW | 2741 | 2020-05-10 02:16:14 | <p>Hello. The reason it says that is to prevent exploiters from changing values. Instead, use a <a target="_blank" href="https://developer.roblox.com/en-us/articles/Remote-Functions-and-Events">RemoteEvent</a>. You would insert a RemoteEvent in ReplicatedStorage and rename it to "ChangeData". Then change your LocalScri... |
0 | wanting to make a city rp game need help? | 101446505 | MEZYPLAYS | 0 | 2021-04-05 18:56:51 | <p>I need help making a car spawn with gui and a money system that saves as well as allowing players to earn money by working</p>
| 122046 | ||||||||
1 | Why doesn't my playeradded:connect function work? | 278459018 | SpiderciaPL | 5 | 2021-05-21 13:02:20 | <p>so
``function addSword(player)
local backpack = player:WaitForChild("Backpack")
local sword = game.ServerStorage.ClassicSword:Clone()
sword.Parent = backpack
end</p>
<p>game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:Connect(addSword())
end)``</p>
<p>This code doesn't work</p>
<p>but
<code>ga... | 123649 | ||||||||
0 | Whats the difference between GamePassService and MarketPlaceService? | 160010262 | theevanegps2 | 15 | 2017-04-16 19:21:08 | <p>I want to know whats the difference between GamePassService and MarketPlaceService. I want to make a gamepass enabled game but I do not know which to choose to use my my gamepass runner.</p>
| 42085 | 2 | 43793 | 1 | 13936322 | call23re2 | 87 | 2017-04-16 19:37:43 | <p>GamePassService is used to check whether or not a player owns a gamepass.</p>
<p>Here's an example from the wiki. (<a target="_blank" href="http://wiki.roblox.com/index.php?title=API:Class/GamePassService/PlayerHasPass">http://wiki.roblox.com/index.php?title=API:Class/GamePassService/PlayerHasPass</a>)</p>
<pre clas... |
0 | How do I disable studio drag selection? | 554775092 | doncellanerdy | 21 | 2020-03-07 11:47:08 | <p>Making a plugin and when I drag my UI the selection box activates. I have seen other plugins where you drag the UI and this does not happen. But I am at a loss at how they do this, not sure what to search for. I tried selection box, drag selection, disable, deactivate. None seem to get me any closer to an answer. Al... | 95689 | 1 | 88429 | 0 | 66932798 | moo1210 | 587 | 2020-03-07 15:35:25 | <p>You can use <a target="_blank" href="https://developer.roblox.com/en-us/api-reference/function/Plugin/Activate">plugin:Activate()</a> (whenever your plugin finishes loading or at top of plugin script) and <a target="_blank" href="https://developer.roblox.com/en-us/api-reference/function/Plugin/Activate">plugin:Deact... |
0 | How to change color based on touch? | 8458929 | Aaronoles | 55 | 2014-04-16 23:46:17 | <p>I couldn't explain it very well in the title, so here's a much more specific description. What I want to do is have something like 10 small parts that sprout from the ground, one by one, towards where the player is looking. That, I can do very simply, and it looks a bit like this:</p>
<pre class='brush: lua'>for i =... | 2308 | ||||||||
0 | How would i change this script to a keybind? | 1861793938 | ROBLOXIS14NOW | 5 | 2021-10-10 10:39:57 | <p>Hi. I'm new to scripting and I coded this basic ball script.
How would i make this into a key bind script?
The script:</p>
<pre class='brush: lua'>local Services = {
Players = game:GetService("Players"),
Debris = game:GetService("Debris")
}
local Settings = {
Kick_Cooldown = 1,
Kick_Force = 20
}
loca... | 127825 | ||||||||
1 | How to load a script into ROBLOX from a file on your computer? | 1501637 | PropheticExtinction | 75 | 2016-03-24 16:39:11 | <p>Recently I had been using HTTP and loading my scripts off of x10hosting. However recently my account was suspended because it is apparently against their rules to use their website for hosting of documents that contain scripting.</p>
<p>Anyway, I continued looking and gave up trying to host from a HTTP source and lo... | 28794 | ||||||||
0 | Can some on help me fix this teleporting gui script? | 68730146 | mrpoliceman2004 | 20 | 2014-05-30 04:13:22 | <pre class='brush: lua'>function click()
script.Parent.Parent.Parent.Parent.Parent.Character.Torso.CFrame=CFrame.new(Vector3.new(211.331, 5.061, -211.082))
end
script.Parent.MouseButton1Down:connect(click)
</pre>
| 5833 | 1 | 7762 | 1 | 29814376 | systematicaddict | 295 | 2014-05-30 04:43:11 | <p>Try this:</p>
<p>Also, Vector3.new has 3 arguments, so where I placed the comment, make a brick where you want to move the player to, copy the position, and paste it where it says 0,0,0.</p>
<pre class='brush: lua'>script.Parent.MouseButton1Down:connect(function()
game.Players.LocalPlayer.Character:MoveTo(Vector... |
1 | Why can't I change the color of this particle emitter? | 18846890 | SuperFryX | 130 | 2015-09-22 01:21:56 | <p>I have no idea why this isn't working, though it's probably a simple fix, please help.</p>
<p>Note: FlavColor is a Color3 value.</p>
<pre class='brush: lua'>ParticlePart.ParticleEmitter.Color=Color3.new(FlavColor.Value)
</pre>
<p>Output: Workspace.Essentials.Buttons.Enter.Enter:79: bad argument #3 to 'Color' (ColorS... | 22902 | 1 | 26495 | 2 | 4376147 | NotSoNorm | 777 | 2015-09-22 01:30:35 | <p>Alright, So you're trying to change the 'color' of a particle emitter, Particle emitters have two colors, a start and an end, This requires a special datatype, called <strong>ColorSequence:</strong>
<a href="http://wiki.roblox.com/index.php?title=API:ColorSequence">http://wiki.roblox.com/index.php?title=API:ColorSeq... |
0 | Really basic/simple MouseButton1Click script doesn't work? | 1593155829 | OreyTheOre | 30 | 2021-02-25 21:39:52 | <p>Hey there, so this REALLY simple script doesn't work for some reason. No errors.</p>
<pre class='brush: lua'>script.Parent.MouseButton1Click:Connect(function()
game.StarterGui.Menu.Frame.Black.ImageTransparency = 1
end)
</pre>
<p>yep, it's that basic but it doesn't work. how do i fix it??</p>
| 120682 | 1 | 109993 | 0 | 362594621 | Oxprem | 105 | 2021-02-25 22:27:20 | <p>I think your problem is happening because your calling these from StarterGui. When a player joins the game, any objects inside of StarterGui, will be duplicated and placed into a folder inside the player called PlayerGui.</p>
<p>So, how to fix this?</p>
<p>Im assuming your using a local script, so try this:</p>
<pre... |
0 | How to make Multisync GUI just like RH Studios? | 553307577 | Tatjanaz | 0 | 2023-01-15 13:44:27 | <p>How do I make a GUI that allows me to let clones by using ;clone me dance in sync. And before that, renaming the clones differently using btools.
I don't know how to explain, but basically just like RH STUDIOS' Multisync GUI/Method.
TY!</p>
| 132843 | ||||||||
1 | How to make auto-saving script that works (Not same guy below)? | 1546980603 | Jakob_Cashy | 67 | 2021-07-06 22:29:55 | <p>This script also adds 1 point per second. It's in sss. No errors.</p>
<p>Not saving somehow.</p>
<pre class='brush: lua'>local dataStore = game:GetService("DataStoreService"):GetDataStore("randommeusumtime")
starterRolls = 0
game.Players.PlayerAdded:Connect(function(plr)
local leaderstats = Instance.new("Folder"... | 125128 | ||||||||
0 | My equipped tool is not saving? | 272068485 | ScentedTrashCan | 9 | 2021-04-05 01:57:42 | <p>I have a script that is supposed to save what the player has equipped. When a player equips a tool, it works. It is a GUI button that connects to a remote event. There are no errors, but however it does not save the players last equipped primary and secondary. API services are enabled in the place. This is the scrip... | 122023 | ||||||||
0 | How to make a health draining rain? | 13466933 | harry233 | 0 | 2014-04-16 12:19:36 | <p>I'm about to make a game that contains a radioactive rain but there're two little something.</p>
<ol>
<li><p>How to make the rain (I simulate the rain using the fog in lighting tab) appears randomly.</p></li>
<li><p>How can I make it drain people's health IF they're out in the open (Not under a shelter)</p></li>
</o... | 2130 | ||||||||
0 | Downloading asset failed for asset id 2135455447? | 27344 | yuri1104 | 0 | 2022-09-11 19:17:30 | <p>--[[</p>
<pre class="brush: lua"> ____ _
| __ ) __ _ ___(_) ___
| _ \ / _` / __| |/ __|
| |_) | (_| \__ \ | (__
|____/ \__,_|___/_|\___|
Admin Essentials 2.0
Created by TheFurryFish
Instructions:
Place this Model in
"ServerScriptService"
Note:
You can remove the Model and
place the script itself in
Serv... | 131596 | ||||||||
0 | How do I fix "Position is not a valid member of Workspace"? | 1742076622 | Greninja90290 | 4 | 2021-02-22 02:53:12 | <p>I'm currently learning scripting and so how do I fix this?</p>
<pre class='brush: lua'>myvariable = 10
if (myvariable == 10) then -- Brick Movement and Properties
game.Workspace.Brick.BrickColor = BrickColor.new("Bright red")
game.Workspace.Brick.Anchored = true
game.Workspace.Brick.Position = Vector3.n... | 120495 | 2 | 109874 | 0 | 100539571 | DariusA2008 | 15 | 2021-02-22 03:24:09 | <p>Line 14, Workspace does not have a property for positions.</p>
<pre class='brush: lua'>function MoveBrick (name) -- Move Brick
game.Workspace.Position = game.Workspace.Brick.Position + name
-- /\/\ /\/\
end
</pre>
<p>I'm assuming is that you want to move the brick part, if so, this is just a simple ... |
0 | How do I put a Text GUI above the Player's head? | 176688811 | DevSupremecy | 10 | 2016-11-13 14:16:53 | <p>I've been trying to put a GUI above a player's head that says his/her rank according to a script. This is the part of the script that assigns the ranks:</p>
<pre class='brush: lua'> rank.Name = "Rank"
rank.Parent = leaderstats
if newPlayer.Name == "DevSupremecy" then
rank.Value = "Chief Develop... | 37172 | 1 | 39650 | 0 | 25854472 | MrZombieMarine | 0 | 2016-11-13 14:19:46 | <p>groupid = Put the group id here</p>
<p>game.Players.PlayerAdded:connect(onPlayerRespawned)
function onPlayerRespawned(newPlayer)
wait(1)
if newPlayer:IsInGroup(groupid) then
local gui = Instance.new("BillboardGui")
gui.Parent=newPlayer.Character.Head
gui.Adornee=newPlayer.Character.Head
gui.Size=UDim2.new(2,0,.78,0)... |
0 | How do I convert a roblox.com asset link to rbxassetid? | 126451147 | Lucke0051 | 165 | 2019-08-03 07:52:20 | <p>I want to convert a <code>https://www.roblox.com/library/</code> asset link to a <code>rbxassetid://</code> link <strong>inside a script</strong>. How would I do that? If I just put the roblox.com link into the texture I am adding it to it gives me an failed to load error.</p>
| 85000 | ||||||||
0 | Error: Expected ‘:’ not ‘.’ calling member function (?) | 182555483 | UndefinedN00B | 0 | 2021-01-30 23:30:31 | <p>I was just using metatables and instances to add custom properties and methods. I put the <code>__index</code> of the metatable to the instance that I'm trying to add extra properties to. But when I try to call a method such as <code>customClass:FindFirstChild("SomeObjectName")</code> I get this error:</p>
<pre clas... | 119410 | ||||||||
0 | i have a timer made but i want to make it so when it hits 0 it resets? | 183885957 | Chaotic_Devel0per | 7 | 2021-06-16 06:54:03 | <p>here is my script
its a local script
(local seconds = script.Parent.Parent.Time
script.Parent.Text = seconds.Value
for i = 1,seconds.Value do
wait(1)
seconds.Value = seconds.Value - 1
script.Parent.Text = seconds.Value
end
)</p>
| 124451 | ||||||||
0 | How to make a point giver and game regen including terrain like in dig to china? | 827900517 | Megati_PL | 2 | 2023-01-16 20:07:44 | <p><strong>PROBLEM #1</strong></p>
<p>So what im trying to do here, if someone touches a part, it will give a message like:
<em>"[user] digged to china!"</em>
and will recive like a 1,000 points.
<em>(i have leaderstats already)</em>
and i want to be like, there woudl be 8 mins in the round, and you can touch it once, ... | 132868 | ||||||||
0 | How can I turn this Local Script into a Server Script? | 438375148 | DukeOfWorms | 18 | 2021-02-26 00:25:55 | <p>Hello there, I'm trying to make a system in which when you join the game the server will clone a specific part and through a local script I made it so that part's position is updated so it is always beside you. The problem is that since it is a local script it only shows that part following me for myself, others can... | 120688 | ||||||||
0 | How would you "Cut" an image in an ImageLabel? | 21063444 | Fraxinus_Sanctus | 38 | 2017-12-24 04:16:39 | <p>This is what I have so far, it Just gets the players image and puts it on the image label, now what I wanted to do is zoom in on the players face area so it only shows that instead of the entire character how would I do that?</p>
<pre class='brush: lua'>local Player = game:service('Players').LocalPlayer
local charac... | 50829 | 2 | 50638 | 2 | 51714312 | Rawblocky | 217 | 2017-12-24 05:32:59 | <p>Do this, this basically shows the version on the profile where you can only see the head.</p>
<pre class='brush: lua'>local Player = game:service('Players').LocalPlayer
local characterImageFormat='https://www.roblox.com/headshot-thumbnail/image?userId=%d&width=420&height=420&format=png';
while wait(1) do... |
0 | How could I make sound play during a player entered cut scene? | 13771247 | BrendanVespucci | 0 | 2014-03-02 21:12:05 | <p>I am using the CloneTrooper1019 cutscene creator.</p>
| 449 | ||||||||
1 | How can I teleport players to a specific area in my place? | 31253214 | OfficialAndrew | 45 | 2014-03-01 22:44:46 | <p>Hi,** I'm kinda new to scripting,** so sorry if I seem "noobish".
<strong>How can I teleport players to a specific place?</strong></p>
<p>Like, I dunno...</p>
<p>if (something) true then
(teleport script)</p>
<p>Okay, thanks.
I'm also new to this site, so, yeah.</p>
| 415 | ||||||||
0 | Why doesn't just this part of my code work? Do I need to use something else? | 1284453331 | boijuztgotrecked4 | 5 | 2022-06-19 07:36:23 | <p>I'm trying to make an enemy NPC script, everything else in the script works except this part of the code:</p>
<pre class='brush: lua'>for _, Child in pairs(script.Parent:GetChildren()) do
if Child:FindFirstChild("DangerZone") then
Child.Touched:connect(Hit)
print("Player has been hit")
end
en... | 130403 | ||||||||
1 | How to change property of all parts with the same name? [Solved!] | 45803743 | DrCylonide | 158 | 2015-02-21 03:18:40 | <p>How would I change a property (Transparency, CanCollide, etc.) of every part that has the same name?
When I try to do this, it only changes one of them.</p>
| 15148 | 2 | 18230 | 4 | 37794064 | Discern | 1007 | 2015-02-21 03:23:29 | <p>You could put all the bricks in a model, and then use a for loop to change all of them.</p>
<p>Check this out:</p>
<pre class="brush: lua">modelOfBricks = game.Workspace.Model --The model with all the bricks in it.
nameOfBricks = "ColorChange" --The name of the blocks that should be changed (keep quotations).
for i,... |
0 | Item Title/Descriptions; How to interrupt if GUI is already there? | 58010204 | tightanfall | 110 | 2021-09-20 00:53:58 | <pre class='brush: lua'>for _, v in pairs(ItemRooms) do
local Peadastol = v.Pedastol
Peadastol.Touched:Connect(function(p)
if p.Parent:FindFirstChild("Humanoid") and DescCoolDown == false then
DescCoolDown = true
for _, x in pairs(v:GetDescendants()) do
if x:IsA("... | 127567 | ||||||||
0 | Error with FindPartsInRegion3WithIgnoreList? | 42197244 | PreciseLogic | 271 | 2016-07-14 03:22:09 | <p>Working on a script that checks the amount of players in a region by checking the amount of "Torsos" in the region. The script is activated when a part is touched. It works fine in FindPartsInRegion3, but when I use FindPartsInRegion3WithIgnoreList there seems to be a problem with my Ignore table, but I'm not sure w... | 33104 | ||||||||
0 | Why is ipairs in not working on an array? | 1122312651 | totosimamora608 | 61 | 2023-03-25 07:47:47 | <p>Doesn't print anything.</p>
<p>Script</p>
<pre class='brush: lua'>for i,stat in ipairs(sinfo) do
print(stat)
end
</pre>
<p>Array</p>
<pre class='brush: lua'>{
[1]={
["Name"] = "None",
["Gradient"] = ColorSequence.new({ColorSequenceKeypoint.new(0,Color3.new(0, 1, 0)),ColorSequenceKeypoint.new(... | 133238 | ||||||||
1 | Code does not notice light is turned off? | 123599059 | DiamondMiner199 | 30 | 2021-02-22 01:47:23 | <p>Have I done something wrong? My goal here is when a light is turned off for more than between 30 and 50 seconds, a global variable will be set to true causing multiple other events to fire. I'm not having problems with the global variable, it's more that when I turn off the light, nothing happens. I put the print fu... | 120491 | 1 | 109895 | 1 | 102254161 | squidiskool | 185 | 2021-02-22 17:06:10 | <p>The global variable is defined in the wrong place.</p>
<pre class='brush: lua'>_G.blackFigureEvent = false
local Rand = Random.new()
while wait(0.1) do
if workspace.HouseParts.BedLight1.LightPart.PointLight.Enabled == false then
wait(0.1)
print("Light is off")
wait(Rand:NextNumber(30, 50)... |
0 | Struggling to get Power to go up in SB fan game? | 1073917569 | Puppy_lovertheawsome | 84 | 2023-02-27 10:11:29 | <p>I'm making an SB fan game and I need help with my <strong>IntValue going up</strong> Im making a killstreak glove so basically I want it to <strong>Gain 1 power every kill</strong>. There are multiple scripts that have aspects of this so it might take a while to find the issue, <strong>If you are actually taking tim... | 133127 | ||||||||
1 | Are there any lessons? | 28180135 | LordDestroyerChaos | 5 | 2014-03-01 16:47:17 | <p>On lualearners, there are lessons. How about here?</p>
| 391 | ||||||||
0 | What does a stepping motor do? | 43433849 | DarwinYork | 85 | 2015-08-26 22:58:54 | <p>I tried to put a brick on top of a brick with a stepping motor and nothing happened, then when I changed the parameters of the top surface there was a slight vibration when I jumped on it. I just want to know what it does because I found a forum which was basically the only advice on it, and the people on it just sp... | 21954 | ||||||||
0 | While True Script Wont Work More Than Once? | 46714579 | NortonHDD | 14 | 2021-01-12 21:51:59 | <p>This script will work only once, then it doesn't work anymore. The "RedBall" string changes correctly every time. It's something to do with the looping, it only does it once.</p>
<pre class='brush: lua'>while true do
wait()
if game.ReplicatedStorage.RedBall.Value=="true"
then wait()
local new... | 118608 | ||||||||
0 | The Part (Fireball) is not BodyVeloticing where My Mouse Is?! | 1575849153 | EEnergy8 | 225 | 2020-11-22 21:16:17 | <p>So the point is, when i Click Q, the Fireball should launch where my mouse is, but it's not doing that, it just disappears, no errors</p>
<p><strong>Server Script</strong></p>
<pre class='brush: lua'> local BodyVelocitySecond = Instance.new("BodyVelocity", Fireball)
BodyVelocitySecond.MaxForce = Vector3.new(m... | 116175 | ||||||||
1 | button opening door? | 13970097 | namelessassasin | 30 | 2014-04-12 20:55:02 | <p>hi guys this is my script but i dont know why it does not work</p>
<pre class='brush: lua'>function lefttClick(playerWhoClicked)
script.Parent.Parent.trapdoor.Transparency=0.6
script.Parent.Parent.trapdoor.CanCollide=false
wait(2)
script.Parent.Parent.trapdoor.Transparency=0
script.Parent.Parent.trapdoor.CanCollide=... | 1254 | ||||||||
0 | Had a question about my "Placables" system breaking another script when a new item is placed? | 153830228 | KCbiulder | 0 | 2023-03-05 03:06:38 | <p>PlacablesClient: Located inside of the "HammerToolGui" basic rundown is that this script waits for a player to click a button in the gui the corresponds to what item there trying to place. The script gets the model (and its parts) and creates a clone to provide the player with a visual on where there newly placed it... | 133142 | ||||||||
0 | invalid argument #2(Vector3 expected, got nil). How do I fix this? Error at line 31 | 1265159100 | REEL1212 | 0 | 2021-02-22 09:34:24 | <p>So, I tried to make a lightning superpower script, and somehow, I got it wrong:</p>
<pre class='brush: lua'><br />wait(1)
---- Services ----
local ReplicatedStorage = game:GetService("ReplicatedStorage")
---- Variables ----
local Remote = ReplicatedStorage:WaitForChild("ZapEvent")
local bolt = Instance.new("Part")
b... | 120504 | ||||||||
0 | Help with clothing? | 4759398 | killerkill29 | 35 | 2014-12-23 20:30:31 | <p>I have this script, which applies custom clothing to your player. On my screen, the clothing is applied. But, on other people's screens, the clothing is for some reason the clothing they have wearing on their profile. This is my code:</p>
<pre class="brush: lua">local player = game.Players.LocalPlayer
repeat wait() ... | 13556 | ||||||||
0 | [SOLVED] How to remove item from backpack when added? | 2721034 | vovik | 9 | 2019-03-10 11:04:17 | <p>Hi guys!</p>
<p>When i try to :Destroy() tool when it is added to backpack i get this message:</p>
<blockquote>
<p>"Something unexpectedly tried to set the parent of Apple to NULL while
trying to set the parent of Apple. Current parent is Backpack."</p>
</blockquote>
<p>It doesnt destroy the tool, but removes all hi... | 77488 | ||||||||
0 | "Position is not a valid member of Vector3" what's wrong with path? | 1166698644 | R0bloxian_Gaming | 4 | 2022-09-25 07:29:47 | <p>Hello, I'm tried to make a pathfinding for my npc, but something isn't working, I tried to find the path but... "Position is not a valid member of Vector3", please how do I fix this? My script is below</p>
<pre class='brush: lua'>local myHuman = script.Parent:WaitForChild("Humanoid")
local myRoot = script.Parent:Wai... | 131708 | 1 | 118966 | 0 | 152304105 | boredlake | 256 | 2022-09-25 07:53:21 | <p>Well, I'm assuming one of your variables is already a <code>Vector3</code> which means it is already a position in world space so you do not need to index it with <code>.Position</code>. In the error message it should specify a line number, so remove the <code>.Position</code> in that line.</p>
|
1 | How do i add a leaderboard? | 103466946 | kimbriel | 19 | 2020-06-17 01:25:40 | <p>I have already asked this question and I am sorry, but it is not showing in Roblox Studio, is this a glitch with roblox studio?</p>
<pre class="brush: lua">game.Players.PlayersAdded:Connect(function(player)
local stats=Instance.new("Folder")
stats.Name="leaderstats"
stats.Parent=player
local power=In... | 106597 | ||||||||
1 | If player touches any part of the map, They Die? | 1575849153 | EEnergy8 | 247 | 2020-11-16 20:29:04 | <p>Basically, after a countdown, a Random map is supposed to be chosen, which works fine.
If player touches any part of the random selected map, they are supposed to die, but it's not working
attempt to index nil with 'Connect'</p>
<pre class='brush: lua'>local chooseRandom = game.ServerStorage:GetChildren()
local theC... | 115895 | 1 | 106383 | 1 | 461604490 | 2Loos | 145 | 2020-11-16 21:30:25 | <p>No need to get the <code>Children</code> of <code>v</code>, just use an <code>if, then</code> statement to make sure that only <code>Part</code>(s), <code>BasePart</code>(s), and <code>MeshPart</code>(s) are considered. I slightly tweaked your script.</p>
<pre class='brush: lua'>local chooseRandom = game.ServerStora... |
0 | Health Gui of an object on the screen? | 141431006 | VirusGodenot_br | 0 | 2022-07-30 14:27:39 | <p>Ive been trying to make a health gui for an object, ive made it so its ontop of said object.
But i want it to be a gui on the screen.</p>
<p>Does anyone have any ideas?</p>
| 131012 | ||||||||
0 | Remote event won't fire? | 314761988 | Manby7 | 32 | 2021-01-11 20:26:44 | <p>By the way, this is a local script parented to a GUI button. The server-sided script works, it just won't fire on the client when you click.</p>
<pre class='brush: lua'>script.Parent.MouseButton1Click:Connect(function()
game:GetService("ReplicatedStorage"):WaitForChild("Remotes"):WaitForChild("BuyHouse"):FireSer... | 118559 | ||||||||
0 | How would I find the local player in a server script? | 938349923 | Carlowskey | 11 | 2021-05-02 16:30:12 | <p>I am making a script, that every time the npc dies, the player gets +10 coins to their leader stats named "coins". I use the player added function but it only adds plus 10 once. then when the npc health value reaches 0 again, it doesn't add +10. Please help!</p>
<p>local health = script.Parent --script is in a healt... | 123033 | ||||||||
0 | Issue with client not receiving signal from server when it should? | 1483026272 | wswswff | 39 | 2023-02-28 15:34:34 | <p>I'm making a tutorial system. The server detects if the player has joined for the first time. If so, it fires a remote event that is in replicated storage. Here is the server code:</p>
<pre class='brush: lua'>local Users, DataService = game:GetService("Players"), game:GetService("DataStoreService")
local Store = Dat... | 133131 | ||||||||
0 | Best Way to View Data From the Client? | 154638712 | chillyenorman80 | 2 | 2022-08-14 09:44:06 | <p>Right now, I am very satisfied with the way I am handling the client viewing the server's data. In essence, the player's data (dictionary) is 'converted' to folders and attributes for the client's viewing sake. So, the dictionary would look like this:</p>
<pre class='brush: lua'>{
Stats = {
Money = 300,
Exp = 200,
}... | 131223 | ||||||||
1 | Please help my Walkthrough Players script is not working? | 469500873 | poppyloverb | 20 | 2021-05-01 17:19:29 | <p>A local script in Starter Player > Starter Player Scripts.</p>
<p>Stack Line:</p>
<p>Stack Begin - Studio
17:54:16.250 Script 'Players.poppyloverb.PlayerScripts.LocalScript', Line 3 - Studio - LocalScript:3
17:54:16.251 Stack End</p>
<p>Code:</p>
<pre class='brush: lua'>local player = game.Players.LocalPlayer.Charac... | 123000 | 2 | 112075 | 0 | 17742179 | LordOfLuxury | 84 | 2021-05-01 18:26:51 | <p>You actually can't set characters' body parts to be CanCollide false except for limbs. You need to use <a target="_blank" href="https://developer.roblox.com/en-us/articles/Collision-Filtering">collision groups</a>.</p>
<p>The first thing you'll want to do is set up a collision group like <a target="_blank" href="htt... |
0 | How would you pass multiple values for a particle emitter? | 78280248 | Wayyllon | 170 | 2020-12-22 09:35:48 | <p>Im trying to have a particle emitter get generally more violent when the playback loudness of an audio goes over a certain amount but i dont know how to pass multiple values into the particle emitter.</p>
<pre class="brush: lua">local PE = game.Workspace.FireThing1.ParticleBrick.ParticleEmitter
local NP = game.Works... | 117520 | 1 | 107647 | 0 | 183198803 | MLGwarfare04 | 183 | 2020-12-22 11:48:59 | <pre class="brush: lua">-- fixed example of your code
local PE = game.Workspace.FireThing1.ParticleBrick.ParticleEmitter
local NP = game.Workspace.NowPlaying
local V = game.Workspace.NowPlaying.Sooooooooong
local PE = game.Workspace.FireThing1.ParticleBrick.ParticleEmitter
workspace.NowPlaying.ChildAdded:Connect(functi... |
2 | GUI not centering | 49776603 | TomsGames | 225 | 2014-03-19 18:55:09 | <p>Alright, so I have a screengui in startergui, then a frame, then an imagelabel.</p>
<p>The imagelabel is this size:</p>
<p>{0, 100}, {0, 100}</p>
<p>So the way I learn it, 1 - 0.1 = 0.9
0.9/2 = 0.45</p>
<p>So I should put the position at..</p>
<p>{0.45 0}, {0.45, 0}</p>
<p>To centre it. Right?</p>
<p>Well it's not w... | 797 | ||||||||
0 | How do you make an admin script? | 34030256 | whsoccerplayer6 | 0 | 2014-04-30 23:58:10 | <p>I am new to scripting, and I really want to make a successful place without using free models. I know it will take a lot of time to get used to, but how do I create an admin script? And with the commands for messaging, flying, dying, banning, all of that.</p>
| 4027 | ||||||||
0 | How to change the default print("Hello World")? | 241765627 | modernadelmohamed | 0 | 2021-01-11 19:15:27 | <p>print("Hello World")</p>
| 118558 | ||||||||
0 | How do I find a Player from game.Players in a server script? | 261271670 | Asynchronize | 16 | 2019-01-16 01:27:22 | <p>I am making this SurfaceGui that when you click it opens up a TextBox (this is all local). I want to be able to trasnfer whats in that TextBox to a TextLabel in Workspace for the whole server to be able to see. I know I can't use LocalPlayer in a server script, so how else would I be able to do this? (This is for FE... | 74533 | ||||||||
0 | Can someone explain why this does not work? I am following a CFrame tutorial. [SOLVED] | 1784172640 | IsaacFriend808 | 6 | 2021-08-05 04:40:13 | <pre class='brush: lua'>local newCFrame = CFrame.Angles(0,math.rad(45),0)
</pre>
<p>The Part that this script is under does not even move, nor turn 45 degrees.</p>
| 126097 | ||||||||
0 | Why does my SurfaceGUI leaderboard not work? | 1002773 | Spongocardo | 1991 | 2014-02-24 23:38:03 | <p>Hi guys, I've tried to make a script where a SurfaceGUI would state the name and score of the player who had the highest score in a table in first place and the lowest score in a table in second place.
I tried to also make it so it sorts the player by their PlayerNum value in the player (which is created when the pl... | 284 | 1 | 517 | 3 | 39760131 | Hippalectryon | 3 | 2014-02-25 00:01:07 | <p>I believe your 'for' at line 5 should end at line 8</p>
|
0 | Roblox - how to make when i click button tv program turn on? | 803129850 | watarod | 0 | 2021-04-21 09:30:21 | <p>How can I do that when I click this yellow button, the program will appear and the program's sound will start to play, and when I click the button again, the program will turn off and the program sound will stop playing and so on. The name of the TV is Old TV, the name of the sound is sound and the decal name of the... | 122623 | ||||||||
0 | How to make yourself invisible to all clients except yours? | 91205701 | EpicScarGaming121 | 20 | 2021-01-13 01:37:00 | <p>I want to activate a script to become invisible to other players, but i still want the player to see their character. I have tried using part.LocalTransparencyModifier, but i dont know how exactly i can implement it.</p>
| 118618 | ||||||||
0 | NPC dialogue script, for loop not working properly? | 9924260 | ArtiTicce | 0 | 2022-08-07 18:55:02 | <p>I have a dialogue script that allows the player to press E on an NPC and start a conversation. Pressing X makes the dialogue progress to the next sentence, and Z exits the conversation.</p>
<p>I have a for loop that's supposed to loop through each sentence that the NPC says, and output each letter, one by one. It's ... | 131131 | ||||||||
0 | Render Connection won't Disconnect after false? | 331809274 | TechModel | 118 | 2022-06-24 03:48:00 | <p>I'm just trying to get a rainbow effect and toggling it using v variable wont even disable it. After v == true it is looped forever. How can I fix this? I even searched the web and It still does not help, putting disconnect in the connection loop.</p>
<pre class='brush: lua'>local v == true
if v == true then
loc... | 130491 | ||||||||
0 | How can I use a StringValue to search for specific items in a folder? | 1668984602 | ABHax101 | 4 | 2021-04-06 17:28:46 | <p>I am working on a racing game, and I have a datastore which keeps track of which car a player has. It works, and I can save the player's car, but i'm not too sure how to load the player into the right car when a race starts. Here's how it works;</p>
<p>My cars are in a folder in ServerStorage called 'cars'. Each pla... | 122084 | ||||||||
0 | How to retrieve JSON search queries from ROBLOX's Catalog API? | 14277028 | Wiscript | 622 | 2020-04-16 13:21:40 | <p>I've been trying to retrieve item data from <a target="_blank" href="https://developer.roblox.com/en-us/articles/Catalog-API">ROBLOX's Catalog Api</a>.</p>
<p>For example, if I wanted to find a Model with the search querie "TEST", I would do
<code>"https://search.roblox.com/catalog/json?CatalogContext=2&Category... | 99474 | ||||||||
1 | [Solved]My trail color changer not working? | 146413048 | CaptainD_veloper | 290 | 2019-03-18 00:58:12 | <p>So I have a trail color changer, which fires and recieves correctly, but it doesn't change the color correctly. The color always changes to black. Here is the local script:</p>
<pre class="brush: lua">script.Parent.MouseButton1Click:Connect(function()
game.ReplicatedStorage.ChangeTrailColor:FireServer(script.Par... | 77787 | ||||||||
0 | HOW TO FIX Syntax error: expected when parsing expresion!?! | 1050262095 | Iamverychill2 | 2 | 2021-04-05 16:38:33 | <p>PLEASE FIX THIS SCRIPT :( I WANNA MAKE A HORROR GAME BUT I CANT DO THIS</p>
<pre class='brush: lua'>local Song = script:FindFirstChild("Caretaker stage 1")
if game.StarterGui.MenuGui.Frame.Visible = false then
script.Song:Play()
end
</pre>
| 122038 | 2 | 111156 | 0 | 356967107 | Ludzik78 | 81 | 2021-04-05 16:46:04 | <p>In if statements, equals must be ==. Also, If you mentioned a variable, dont do script.Song, just Song
Fixed Code:</p>
<pre class='brush: lua'>local Song = script:FindFirstChild("Caretaker stage 1")
if game.StarterGui.MenuGui.Frame.Visible == false then
Song:Play()
end
</pre>
|
0 | Strings - how do you detect the third word a player says? | 1539306847 | BIuehawks | 62 | 2020-07-21 17:46:55 | <p>So I get that you can use string.sub to check if the player's first few letters are a prefix, and then you can use whatever they say after that as a player's name, or whatever.</p>
<p>But how exactly do you find out where the second word ends? I mean, let's say I wanted to make a command that would forcefield a play... | 109626 | 2 | 100758 | 2 | 93937677 | uhi_o | 417 | 2020-07-21 18:06:18 | <p>So you can use string.split method for strings that roblox has implemented.</p>
<p>Here's an example</p>
<pre class='brush: lua'>game.Players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(msg)
local ThirdWord = msg:split(" ")[3] --Splitting the message which returns an array
--[[... |
0 | Weird error says " ServerScriptService.Main:7: Expected <eof>, got 'end'". How do I fix this? | 758740345 | PLAINSTER10 | 4 | 2022-06-22 02:16:10 | <p>I am making a tower defense game. There's this weird error that pops up when I try to run my game and prevents zombies from spawning on the map. This error is so bafflingly odd that I don't even know where to start.</p>
<p>Is there something I'm missing here? Wrongfully typed code? Missing semicolon?
Can someone tel... | 130448 | 1 | 117787 | 0 | 34716028 | cmgtotalyawesome | 1403 | 2022-06-22 02:57:22 | <p>In your first script there isn't any reason to have the end on the last line. Any time you see eof in your error message you can assume that you did something wrong with your end placements. A working script would just be this:</p>
<pre class='brush: lua'>local mob = require(script.mob)
local map = workspace.Thickbo... |
1 | [MEMBERSHIP Style DevProduct] - Where can I start from? | 14277028 | rodrigo455 | 578 | 2017-12-16 14:30:34 | <p>So, I'm trying to make a Membership type of DevProduct. This means they can buy a membership, as a DevProduct (or something else), which will last for a certain amount of time. I've seen this on many games such as <a target="_blank" href="https://www.roblox.com/games/1026891626/The-Mad-Murderer-2">The Mad Murderer 2... | 50395 | 2 | 50231 | 1 | 1971222 | kools | 518 | 2017-12-16 18:06:01 | <p>This is a good question. The few constraints we would need to consider are that people can buy the membership repeatedly while still having a membership. We would not want to cut their time short, so we need some way of adding to when it will expire.</p>
<p>I would implement this with the following tools.</p>
<ul>
<... |
0 | can someone help me add a cooldown on this animation script? | 354043187 | steel_apples | 28 | 2021-05-01 03:50:09 | <p>its a simple script from a YT vid, i cant figure out how to add a cooldown to make it so you cant play the animation again until the cooldown ends</p>
<pre class='brush: lua'>local Tool = script.Parent
local Animation = Tool.Animation
Tool.Activated:Connect(function()
local Character = Tool.Parent
local Huma... | 122982 | ||||||||
0 | Keeping Hinge Joints Connected? | 307412 | deaththerapy | 60 | 2014-06-14 18:57:32 | <p>A turret I've made uses a <code>BodyGyro</code> to aim its barrel at players, and then shoots a bullet towards the barrel's <code>lookVector</code>. This method would work great if the hinge joints that allow the gun to rotate freely didn't break apart every other time a server is started. Is there a way to keep thi... | 6671 | ||||||||
0 | Object not cloning, what have I done wrong? | 1169362290 | iiMxtt_Destinyii | 58 | 2021-04-05 00:38:04 | <p>My code is not cloning my item so, I am unable to do anything until I find the cause of this. Any help would be appreciated.</p>
<pre class='brush: lua'>function TestService:Spawn(Player, Weapon)
if Weapon ~= Items.IDArray[Weapon] then
game.ReplicatedStorage.SuccessMessage:FireClient(Player, "? Successfu... | 122020 | ||||||||
0 | How do I use GetDescendants() properly? | 18231176 | Beastlance | 22 | 2018-07-21 20:19:56 | <p>This has been an important tidbit of code I've needed to learn how to use for a while. Can I use this function to find specific classes (i.e. Part, Folder, Script...), and if so, how? Here's what I've tried so far:</p>
<pre class="brush: lua">local sP = script.Parent
function totaling()
wait(4)
local wins = ... | 63395 | ||||||||
0 | How do I make an armor? | 50095443 | SpaceEnder | 5 | 2014-02-28 19:32:09 | <p>For example: In Space Knights you automatically wear the armor, and in crystal raiders also, how do I make that? also, any roblox wiki article or youtube tutorial will help me a lot.</p>
| 365 | ||||||||
0 | How do you make a script builder? :loadstring()? | 14284632 | magicalandre13 | 5 | 2014-02-20 23:29:12 | <p>I don't really have experience with scripting in-game.</p>
| 182 | ||||||||
0 | How would you visualize a raycast (laser/bullet)? | 208886623 | RocketDino05 | 0 | 2021-04-05 18:16:22 | <pre class='brush: lua'>local replicatedStorage = game:GetService("ReplicatedStorage")
local weaponRemoteEvents = replicatedStorage.remoteEvents.weaponRemoteEvents
weaponRemoteEvents.shootEvent.OnServerEvent:Connect(function(player, mousePos, bulletTravelDistance, toolHandle, damage, toolName)
local rayParams = Ray... | 122044 | ||||||||
0 | MouseButton1Click fires through an UI? | 1017846707 | Overseer_Prince | 145 | 2021-04-06 12:38:05 | <p>MouseButton1Down fires through an frame I have.</p>
<p>let me explain more clearly</p>
<p>I have an frame with an ZIndex of 10</p>
<p>I have an image button with an ZIndex of 1</p>
<p>whenever I click the frame</p>
<p>The event fires</p>
| 122067 | ||||||||
0 | I can't Parent Other Player's Weapons Into Mine with Mouse? | 1575849153 | EEnergy8 | 266 | 2021-09-19 14:16:42 | <p>Hey, It's been awhile since i last scripted and im abit lost.
What I'm trying to do is when I point at a character, the Weapons that they have, should Transfer to my character.</p>
<p>The Character im pointing has already a Weapons Folder with Tools in the folder.
I get the Print "Found Target" even when I point at ... | 127550 | ||||||||
0 | How do I make MeshParts and Parts stay inside a MeshPart? | 407180563 | robloxtitanic584 | 87 | 2021-01-13 02:38:56 | <p>I already tried WeldConstraits.</p>
| 118625 | ||||||||
0 | The Coin is not respawning after 5 seconds? | 791392321 | DuckyRobIox | 280 | 2019-02-03 19:20:34 | <pre class='brush: lua'>local db = true
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") ~= nil then
if db == true then
db = false
script.Parent.Transparency = 1
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
... | 75680 | 1 | 71109 | 0 | 83908862 | blockmask | 371 | 2019-02-03 19:51:43 | <p>I tested this out myself, and it works. Also, I fixed parts in your script</p>
<pre class='brush: lua'>local db = true
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") ~= nil then
if db then
db = false
script.Parent.Transparency = 1
... |
4 | How do I make a sound play when a brick is clicked, and play for only the person who clicked it? | 22538269 | Tallestmidget7 | 95 | 2014-04-22 23:19:50 | <p>So I'm fairly sure I know how to make the sound play when a player clicks a brick.
I think it would be a brick with a click detector in it, and then the script would be:</p>
<pre class='brush: lua'>script.Parent:Play()
</pre>
<p>At least I think so.
But the real problem, is how would I make it so only the player who... | 3314 | 4 | 4637 | 0 | 343558 | Sublimus | 992 | 2014-04-22 23:20:56 | <p>Yes, just place the sound in the PlayerGui, that will make it play locally.</p>
|
2 | How do I use Random.new(), Tick(), and what are 'seeds'? | 1053072695 | zomspi | 541 | 2020-05-11 09:38:50 | <p>What the title says.</p>
| 102714 | 1 | 94843 | 9 | 74087102 | Ziffixture | 6913 | 2020-05-11 10:16:08 | <blockquote>
<p>Understanding your question:</p>
</blockquote>
<p>These correlate to pseudo-random-number-generation or <strong>PRNG</strong>... A computer is too precise to be capable of <em>pure</em> random calculations, though, it can mimic such a thing through an algorithm comprised of mathematical formulas that pr... |
0 | How do I disable Jumping on a Humanoid? | 1810473 | hiccup111 | 231 | 2014-07-25 13:35:16 | <p>I've looked through the Wiki, but I cannot find a method to disable jumping.</p>
<p>I've used messy methods like forcing the player in one position, but as I said, messy, and it makes other problems with the physics.</p>
<p>If you have any information on this, even just a reference, I'd most appreciate it.</p>
<p>Th... | 8662 | 1 | 11233 | 3 | 57706445 | RedCombee | 585 | 2014-07-25 14:10:57 | <p>In just about every instance (if not all), there is an Event called "Changed." When any value or child the instance carries changes in any way, this will activate. To use this to your advantage, jumping will change the Humanoid, so you can use:</p>
<pre class='brush: lua'>humanoid.Changed:connect(function()
humanoid... |
1 | How do you make an NPC from replicated storage die? | 74940166 | logo12353 | 7 | 2021-02-26 03:42:50 | <p>I have this script that doesn't remove the model when it dies</p>
<p>Script-</p>
<p>CarnoNPC = script.Parent</p>
<p>if CarnoNPC.Humanoid.Health == 0 then</p>
<pre class="brush: lua">CarnoNPC:Remove()
</pre>
<p>end</p>
| 120696 | ||||||||
0 | What are some good tutorials / pages to learn intermediate to advanced scripting? | 192986548 | iiParadoxLegacy | 38 | 2017-02-01 07:10:01 | <p>What are some good tutorials / pages to learn intermediate to advanced scripting?</p>
<p>I can't really find any good tutorials / pages on how to learn Intermediate to Advanced scripting, does anyone know about some?</p>
| 39641 | ||||||||
0 | Tool holding arm doesnt animate? | 293872889 | Galicate | 106 | 2017-12-24 19:53:20 | <p>I have a animation that reloads a gun and for some reason, whenever it plays everything except the right arm moves.</p>
| 50866 | ||||||||
1 | Why is my ROBLOX Studio Messed Up? | 50411523 | AlphaKlutch | 5 | 2014-02-19 21:13:55 | <p>I try to copy a game or edit mine and it says "Please Try Again"</p>
| 122 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.