#Code help pls

1 messages · Page 1 of 1 (latest)

normal tinsel
#

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

#

i will do in parts now

#

this is first:

#

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)

#

now this is second:

#

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)

normal tinsel
#

anyone help me if you guys want

#

DM me

normal tinsel
#

bro why the others respond to others help and me no

mystic shoreBOT
#

studio** You are now Level 1! **studio

old hawk
#

@normal tinsel sounds like an issue wherever togglecharacterevent is being recieved

normal tinsel
#

Idk

old hawk
#

bruh wdym idk use that information to try and solve it

normal tinsel
#

is all good