#script teleports when i open the gui a second time

55 messages · Page 1 of 1 (latest)

shell basalt
#

wdym exactly

frozen sedge
#

this is what i mean

#

oh wait

#

let me repost the video

#

hope you don't mind the music

#

i forgot to close it

shell basalt
#

nah its fine

frozen sedge
#

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

shell basalt
#

ig ik why

frozen sedge
#

why?

shell basalt
#

so

#

ig the FocusLost is being connected mutiple times

frozen sedge
#

no cause like it works on another script i've made

#

or does itr

#

yea idk

shell basalt
#

ig u need to delete the old one after

#

i will try make a script for it

frozen sedge
#

the problem is

#

and i tested it

#

it goes over the "if place.Text == "1998"

#

the second time

#

OH WAITR

#

i have an idea

shell basalt
#

wht is it

frozen sedge
#

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

shell basalt
#

i am retyping it rn

frozen sedge
#

OK SO

#

yea it's broken

shell basalt
#
  • i see smth wrong
frozen sedge
#

ok

shell basalt
#

UR TELEPORTING PLAYER FROM LOCAL SCRIPT R U KIDDING

#

thats not the problem but this is another problem

#

u need to connect remote event

shell basalt
#

@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

frozen sedge
#

ok let me check

#

yep

#

works

#

thank you so much @frozen sedge !

#

wait no

#

@shell basalt

#

yea

#

thank you so much