Relative Content

Tag Archive for luaroblox

Pressing “W” or “A” makes me run but pressing both stops the animation

local UIS = game:GetService(‘UserInputService’) local Player = game.Players.LocalPlayer local Character = Player.Character UIS.InputBegan:connect(function(input) if input.KeyCode == Enum.KeyCode.W or input.KeyCode == Enum.KeyCode.A then Character.Humanoid.WalkSpeed = 22 –run speed local Anim = Instance.new(‘Animation’) Anim.AnimationId = ‘rbxassetid://18686242456’ PlayAnim = Character.Humanoid:LoadAnimation(Anim) PlayAnim:Play() end end) UIS.InputEnded:connect(function(input) if input.KeyCode == Enum.KeyCode.W or input.KeyCode == Enum.KeyCode.A then Character.Humanoid.WalkSpeed = 16 –default walk […]

Pressing “W” or “A” makes me run but pressing both stops the animation

local UIS = game:GetService(‘UserInputService’) local Player = game.Players.LocalPlayer local Character = Player.Character UIS.InputBegan:connect(function(input) if input.KeyCode == Enum.KeyCode.W or input.KeyCode == Enum.KeyCode.A then Character.Humanoid.WalkSpeed = 22 –run speed local Anim = Instance.new(‘Animation’) Anim.AnimationId = ‘rbxassetid://18686242456’ PlayAnim = Character.Humanoid:LoadAnimation(Anim) PlayAnim:Play() end end) UIS.InputEnded:connect(function(input) if input.KeyCode == Enum.KeyCode.W or input.KeyCode == Enum.KeyCode.A then Character.Humanoid.WalkSpeed = 16 –default walk […]

My server scripts (with different parents) referencing script.Parent seem to be referencing all of their parents

I have a teleporter system where when a player touches a part, they get put into an elevator, a countdown starts, and the first player to enter the elevator gets to set some different options like the map and difficulty. This all works properly if there is only one elevator, but when I duplicate the elevator and someone enters one, the gui gets updated on all of the elevators and when the player leaves the elevator it loops through all of the elevator’s exit locations and puts the player at the last one.

How can I make a time table for events in Roblox Studio?

I’m making a game where at certain times of the (in-game) day, a GUI will come up saying “It’s Lunchtime” and things like that for the server to see, as well as a teleport button to go to the room where the event is being held.

How could I fix the InspectPlayerFromHumanoid issue? Roblox Studio

I currently have 2 local scripts inside of StarterCharacterScripts, One of them puts the proximityprompt inside the UpperTorso, the other one inspects when the proximityprompt is triggered (Right now I have it set to ended for testing purposes) This works fine, but when I try to inspect another persons avatar so I hold their proximity inside their torso down it does not inspect theirs at all. But it works completely fine when I inspect my own but when someone else tries to inspect mine it does not work either meaning its only able to inspect the local persons and no one elses why is this? (Both local scripts are inside ProximityPrompt, and the proximity is inside SCS)

Recognizing part with LocalScript

I am attempting to make a button that will only change on the screen of the player who interacts with it, however I am struggling to have the LocalScript actually recognize the part I need to be pressed

My code is not working even though I followed a tutorial

so my code is supposed to make a sphere look at the player and follow them with the decal facing them, however, the issue is that sphere, in every instance, has the error “unkown global ‘sphere’.
I have never coded in lua and simply followed a tutorial word for word

I need a tutorial in Roblox Studio

so i was in roblox studio and i had an idea, when you are locked in first person you cant move the mouse so, when i pressed the letter “V” the mouse would be movable and once you clicked “V” again the mouse would return locked just like weird strict dad