I'm making a Roleplay game and i was trying to make the doors like how the are in MeepCity.I press a specific key and it teleports me in the building. Thats what i've made.
Player = game.Players.LocalPlayer Mouse = Player:GetMouse()
Settings = {
CanTeleport = true;
WarpGui = true;t
TeleportKey = "e";t
TeleportTime = .1;
}
S = Settings
UDIM = UDim2.new
Mouse.KeyDown:connect(function(key)
local Enabled = true
if S.CanTeleport then
if Enabled then
if key == S.TeleportKey then
Enabled = false
wait(S.TeleportTime)
if S.WarpGui then
local WarpGui = script.WarpGui:Clone()
WarpGui.Parent = Player.PlayerGui
for k = 0, 21, 1 do
WarpGui.MainFrame.Bar.Size = WarpGui.MainFrame.Bar.Size + UDIM(0, 10, 0, 0)
wait()
end
WarpGui:Destroy()
end
I tried to make it also with a GUI.But it doesn't work.

1 comment
Thank you