I am making a sandbox game that locks you in first person and I want to make one of my tools I have allow you to move your cursor when it is equipped. I don't want any of my other items to allow you to move your cursor in first person.
Here is my script:
local Tool = script.Parent
if Tool.Equipped then local plrGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
local screenGui = Instance.new("ScreenGui", plrGui)
local txtButton = Instance.new("TextButton")
txtButton.BackgroundTransparency = 1
txtButton.Size = UDim2.new(0, 0, 0, 0)
txtButton.Modal = true
txtButton.Parent = screenGui
if Tool.Unequipped then
txtButton.Modal = false
end
end

1 comment
Thank you very much!