#script teleports when i open the gui a second time
55 messages · Page 1 of 1 (latest)
this is what i mean
oh wait
let me repost the video
hope you don't mind the music
i forgot to close it
nah its fine
this is what i mean
i put "elseif" because even without it, if i only pressed else, the second time i open it it's the same
ig ik why
why?
the problem is
and i tested it
it goes over the "if place.Text == "1998"
the second time
OH WAITR
i have an idea
wht is it
nope
i thought that maybe if i change the text back to "" (nothing) it works
because i tought the script thinks it's stuck with the text 1998
that's why it probably goes over the If part
i have the weirdest script
it types out "Wrong year buddy, but also teleports me?
wtf
i am retyping it rn
- i see smth wrong
ok
UR TELEPORTING PLAYER FROM LOCAL SCRIPT R U KIDDING
thats not the problem but this is another problem
u need to connect remote event
nvm thats wrong
@frozen sedge
try this
local place = script.Parent
local player = game.Players.LocalPlayer
local part1998 = game.Workspace:WaitForChild("1998 teleporter")
place.FocusLost:Connect(function()
if place.Text == "1998" then
local hum = player.Character:WaitForChild("HumanoidRootPart")
hum.CFrame = part1998.CFrame + Vector3.new(0, 5, 0)
script.Parent.Parent.Enabled = false
elseif place.Text ~= "1998" then
place.Text = "Wrong Year Buddy"
place.TextColor3 = Color3.new(255, 0, 0)
wait(1)
place.Text = ""
place.TextColor3 = Color3.new(0, 0, 0)
end
end)
@frozen sedge did it work