Hello,
So my goal is to check if the player has an island and the island’s number and teleport the player to the right island.
So i created a script that’s create a StringValue when the player join to the game. And the value is “False” (when the player don’t have an island)
And the player can get an island by walking trough this door:
https://gyazo.com/d089ff4adb5efa83a56f3f4a553a23c8
And i have a scirpt in the island wich is set the Status(StringValue) to "True(And the number of the island like here to1)
The first part of the script works because if the player doesn’t have an island (The Status value “False”) a message gui gets visible:
https://gyazo.com/b3dba7560f8163b1b7a6e7bb4a258982
But when the player have the “True1” Status value the button don’t work:
https://gyazo.com/37d4e964588d0dc9982acca7f86ee9b3
The localscript:
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
if player.Status.Value == "False" then
script.Parent.Parent.Warning.Visible = true
wait(5)
script.Parent.Parent.Warning.Visible = false
elseif player.Status == "True1" then
player.Character.UpperTorso.CFrame = CFrame.new(-193.131, 0, 103.073)
end
end)
i’ just recently started scirpting