Questions tagged [roblox-studio]
Roblox Studio is an all-in-one IDE that lets you create experiences that run on Roblox in Lua. It's free to use and has scripting, building, playtesting, and publishing tools as well as support for plugins. Use this tag for questions about the Roblox Studio IDE itself.
roblox-studio
130
questions
0
votes
0
answers
12
views
ClickDetector not detecting input
For some reason my Click Detector that I had put inside of my Local Script / Script (tried both) doesn't detect when it's clicked on. Does anyone know what causes this?
Code:
local ts = game:...
-4
votes
0
answers
28
views
Can sm1 help me and my friend with coding in roblox studio (lua) this is js for fun but we need help at like animations and a combat system type [closed]
we js need help with a combat system, and probably armour, we are not familiar with scripting on roblox studio
We tried to make a combat system and it didnt turn out well, we need vfx, animations, and ...
1
vote
1
answer
29
views
Exp bar Gui not updating roblox studio
I have set up a basic exp system with exp, levels, and a Gui. I have the gui set to update when joining, and when gaining exp or a level, but it will only update when joining even though I'm using the ...
-1
votes
0
answers
28
views
Playing sounds for a local player after they leave the game
I've been trying to make a script that plays a sound after a player has left the game in a way that they can still hear the sound themselves. As far as I'm concerned, the issue I've run into is that ...
0
votes
1
answer
26
views
My Script inside my model's part doesn't run when I clone it
This is my code for spawning in the model itself which is located in ReplicatedStorage, which this is the hierarchy:
SpawnDoor (Model)
Door (Sound)
Light (Folder)
Door1 (Part)
Door2 (Part)
Part (Part)
...
-4
votes
1
answer
61
views
What does index nil mean? [closed]
I attempted to mess around with the children because I think that's the problem but I was unsuccessful
local tycoon = script.Parent.Parent
local mainItems = tycoon:FindFirstChild("MainItems"...
1
vote
1
answer
32
views
How to Apply the Same Skin to All Players in Roblox?
I am experimenting in Roblox Studio, and I want to create a logic that would give all players the same skin. (All players must look the same during gameplay.)
I found two options:
First option: Drag ...
-4
votes
0
answers
79
views
I am currently trying to develop a Roblox game;, would somebody be able to help me with locate a module?
This is a module script, it is in ServerScriptService:
local PlayerDataHandler = {}
local dataTemplate = {
Race = "",
Cash = 0,
Inventory = {},
Level = 0,
}
local ...
0
votes
0
answers
21
views
My animation within Roblox Studio plays, HOWEVER in an actual game it doesn't play, but the projectile works
My Problem is that the animation I labelled as "FireballThrow" and the fireball projectile does play in the Roblox Studio environment, HOWEVER in a real game it doesn't execute properly, ...
0
votes
1
answer
17
views
I made a function, but got an 'expected identifier when parsing expression, got '='' error
clickdetector = script.Parent.ClickDetector
newPart = Instance.new('Part', workspace)
newPart:Destroy()
function createPushBlock():
newPart = newPart
newPart.BrickColor = 'Neon orange'
end
...
0
votes
2
answers
36
views
My animation doesnt load while collaborating
local module = {}
local RPunchAnim = Instance.new("Animation")
local LPunchAnim = Instance.new("Animation")
local KickAnim = Instance.new("Animation")
local UppercutAnim =...
0
votes
0
answers
40
views
Script not detecting when a player with a set ID joins. Luau
For some reason a simple script that I wrote, that should call a function whenever a player joins, which after that checks if the players ID is one of the either.
game.Players.PlayerAdded:Connect(...
0
votes
0
answers
25
views
Is there a way to detect if local players character is touching the hitbox instead of the victim? Luau
Main question for me is can I make it so that it can access the local players character from a variable given in a module script? I can't seem to access the character of it, even though it still IS ...
0
votes
0
answers
28
views
model does not move in Roblox
I'm trying to have a model move around and jump using this code but the object does not move. (everything prints until it gets to the movement part.) The model just stays stationary and can be ...
2
votes
1
answer
63
views
Passing arguments through a RemoteEvent in Roblox
I'm currently trying to make a message system in Roblox. The server should be able to send a message via a RemoteEvent, and the client should be able to accept it by displaying the message on a GUI ...
0
votes
0
answers
38
views
Basketball not bouncing properly in Lua in Roblox Studio (I am making a game in Roblox Studio)
As the title clearly suggests, I am making a basketball game in roblox so I have recently been trying to make my basketball part, named "B-Ball" bounce in a continuous motion. This can be ...
0
votes
1
answer
49
views
Stamina bar going from 100 to 0 for no reason, Stamina value not getting any interactions
For some reason whenever I launch my experience, like a second or a half passes and the bar goes from full to empty. I also can't make any interactions with the value. (example: whenever I try to make ...
1
vote
2
answers
50
views
All ModuleScript variables == nil
For some reason, my local variables in the module script all seem to be nil, with no exact explanation for it, or solution.
Local Script (Stamina bar Script):
local ms = require(game.ReplicatedStorage....
0
votes
0
answers
28
views
How do I make a hitbox part move with the character
Is it possible to make a part that is welded to the Humanoid Root Part move with it?
It serves as a hitbox, but I encounter the problem that if I move forward while attacking it hurts the player.
For ...
-1
votes
0
answers
63
views
Animating groups of objects in Roblox Studio using TweenService
I wanted to ask how to move groups of parts using TweenService in Roblox Studio? I just have a detailed model of the table, and I just want to move it, but I need to create a variable for each part ...
0
votes
0
answers
32
views
Can't Stop Punching
My punching Animation Won't stop as once I press M1(LeftClick) it just keeps on punching and won't stop so I'm trying to get the animation to only play when I punch once and than once I press it once ...
0
votes
0
answers
61
views
Variable is not updating when I change it in Roblox Studio Lua
This is the code:
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
money = Instance.new(&...
1
vote
1
answer
50
views
Why doesn't my Roblox Studio print script execute correctly
For some reason, my pretty short script just refuses to print out or do anything after declaring variables, does anyone have an answer? I think it may actually be the wait for child and wait() but I ...
-1
votes
1
answer
54
views
UserInputService isn't detecting inputs
For some reason, my code doesn't work in any way. Does someone has an answer why UserInputService doesn't work for me?
local player = game.Players.LocalPlayer
local character = player.CharacterAdded:...
0
votes
0
answers
16
views
ProximityPrompt seems to only work in certain locations
I am working on a ProximityPrompt based teleportation system, and everything seems to work save for one. It does not work in it's usual spot, but works in other rooms. I have tried everything, but it ...
0
votes
2
answers
34
views
Why does roblox studio walk wrong through the table
I am making a game right now in roblox, and need to make gamepass store, however when my loop goes through it (its a table in table), it goes out of order
Example code with the tables in table
a = {
...
0
votes
0
answers
36
views
How to apply "AsemblyLinearVelocity" from scripts onto "hit.Parent"
Here is the code:
script.Parent.Activation.OnServerEvent:Connect(function()
local part = Instance.new("Part")
part.Size = Vector3.new(1,1,1)
part.Transparency = 0
part....
0
votes
1
answer
33
views
How to wait for the model to load in Roblox? (lua)
How to wait for the model to load? I have a very simple code but 2 out of 3 times when I lunch the game I get an error Players.Alex.PlayerGui.AllSeeingEye:120: attempt to index nil with 'Position'. 1 ...
0
votes
2
answers
37
views
Add a docstring to a lua function in Roblox Studio
I want to create a docstring for a Lua function in Roblox Studios so that when i look at that function that i instantly know what this function does.
And currently the Popup looks like this:
But the ...
1
vote
1
answer
58
views
attempt to concatenate string with nil | Roblox Code, How to fix?
I've been working on a GUI system where I have a health, stamina and EXP bar.
Once I finally got towards the end, I was given an error message on this part of code, saying:
attempt to concatenate ...
-2
votes
1
answer
26
views
Having trouble showing a ScreenGUI by clicking a Part in the workspace
Can anybody tell me why this is not working?
I used a similar script for closing the GUI but when prompted it will not open or make any sound.Screenshot
I need this really soon too 😬😬😬 please help
...
-1
votes
1
answer
31
views
StarterGUI won't fill screen
ROBLOX STUDIO:
I'm trying to make a full-screen menu for the player to buy things off but I'm finding that when I put a frame as a background then the GUI shuffles down to accommodate the built-in ...
0
votes
1
answer
60
views
How to spawn part 35 studs in front of player, facing same direction as player?
I'm trying to spawn a wall in front of the player, 35 studs out, and perpendicular to their view (so the wall is flat in front of them). When I spawn the wall, it doesn't show up in the correct spot ...
0
votes
2
answers
48
views
Cloning classes with obj.__index = self in lua. Why do we need the other one?
I saw a lot of coders do this when init new table, set __index to itself. Why?
local Backpack = {}
Backpack.__index = Backpack
To clone we still use obj.__index = self So why do we need the ...
2
votes
0
answers
27
views
How can I implement a D-Pad movement for console?
I'm making a 2.5D obby and I want to implement D-Pad movement because most people with thumb sticks have stick drift and so I wanted a way for them to play without worrying about uncontrollable ...
0
votes
1
answer
97
views
Getting over the roblox leaderstats intvalue limit
I am making a game that requires a large amount of values, I have it so there are two values: StringValue and IntValue. The intvalue holds the number of the clicks that the player has and then the ...
1
vote
1
answer
61
views
How to change gravity? official documentation is not working
The example from the official documentation is not working when adding it to ServerScriptService
https://create.roblox.com/docs/reference/engine/classes/DataModel
local Workspace = game:GetService(&...
0
votes
0
answers
56
views
How do I destroy a part when it touches another part?
I'm trying to script a Roblox game.
The aim for now is when I click the "AttractButton" the Object should attract towards player's location and stop 4 studs away. On the other hand, clicking ...
0
votes
2
answers
126
views
Is there a way to use/a workaround for http requests in a localscript in Roblox?
I'm making a roblox game, and am using a localscript to handle some of the ui stuff. I need to use an http request to grab the contents of the local players' inventory (not in-game inventory, but the ...
0
votes
1
answer
66
views
HumanoidRootPart not a valid member of Character RBLX
It's a simple local script where I clone the local player's character and place it into my viewport frame
However, when trying to access the member "HumanoidRootPart" (which is usually there ...
0
votes
1
answer
40
views
Attempt to index nil with position drops
The error:
ReplicatedStorage.Modules.Drops:35: attempt to index nil with 'Position'
The line:
if (Character.PrimaryPart.Position - Drop.PrimaryPart.Position).Magnitude < 10 and Drop.CanCollect....
0
votes
0
answers
37
views
Roblox Tower Placement System Causes Towers to Jump and Float
I'm designing a tower defense game on Roblox with Roblox Studio and am currently experiencing issues with the placement system. There is a button on the screen with the text Place Unit, which for ...
0
votes
1
answer
41
views
Roblox Studio Lua: Variable changing without being referenced
This is my module script:
local phases = {}
local function getRoleAssignments(playersToAssignRoles, roles)
--Assigns a random player to each role then removes player from list so player can't ...
0
votes
0
answers
41
views
UI Tween incorrect Positioning, Luau Roblox Studio Ui
I've been trying a lot of ways, it was way worse, it made the pawns disappear and then appear only at the tween complete, so yeah, but now its simpler, so can you help me, I've been reading through ...
0
votes
0
answers
30
views
Why are the buttons in the “VIEW” tab not active?
Why are the “toolbox” and “terrain editor” buttons not active and how to enable them?
I tried to click on the inactive buttons, but quite expectedly the windows do not appear, even restarting the PC ...
0
votes
0
answers
22
views
Why does my Roblox Ui text label sometimes randomly say "100.00M" instead for the correct variable?
I generaly new to Roblox scripting and scripting and general. I am trying to make a clicker game so I made a auto clicker option for players to buy. One is a fast version and one is a regular verison. ...
1
vote
1
answer
108
views
Both Chat:Chat() and TextChatService:DisplayBubble() not working, at all
I'm trying to produce a chat bubble over a part. It should be straight forward, but the now deprecated Chat:Chat() doesn't work, expectedly, but the alternative, TextChatService:DisplayBubble() ...
2
votes
2
answers
137
views
How to type annotate a Module Script in Luau?
I'm currently making a strict type checked script but can't find a way to type annotate a variable that requires a Module Script without using the type any which is bad practice.
DoSomethingScript:
--!...
0
votes
2
answers
65
views
Every mouse click makes the damage script play one additional more time
I am very new to roblox development and was coding a gun script that decreases damage the further away you are, every time you shoot the gun the damage script will play one additional time. if you ...
0
votes
0
answers
74
views
Is there a way to get a completly random youtube channel?
I made a Lua script (roblox) project that aims to obtain a completely random YouTube channel, even without subscribers. I also want to get the channel's subscriber count with HttpService:GetAsync(the ...