so i was doing a script when you press the text button you become a morph. only for owner. then i press the button again and become normal again but i respawn when i press the button, so this is a bug? cuz inside in the text button i do 2 local scripts look: local replicatedStorage = game:GetService("ReplicatedStorage")
local toggleEvent = replicatedStorage:WaitForChild("ToggleCharacterEvent")
local player = game.Players.LocalPlayer
local button = script.Parent
local isFrontman = true
button.Text = "BECOME FRONTMAN"
button.MouseButton1Click:Connect(function()
toggleEvent:FireServer()
if isFrontman then
button.Text = "BECOME FRONTMAN"
isFrontman = false
else
button.Text = "BECOME PLAYER"
isFrontman = true
end
end). 1rst script. local player = game.Players.LocalPlayer
local creatorUserId = 7537722335
script.Parent.MouseButton1Click:Connect(function()
if player.UserId == creatorUserId then
local replicatedStorage = game:GetService("ReplicatedStorage")
local toggleEvent = replicatedStorage:WaitForChild("ToggleCharacterEvent")
toggleEvent:FireServer()
else
print("You are not allowed to become frontman")
end
end) this is 2cond
** You are now Level 1! **