I am trying to move a boat when you sit in it basically. When you are seated in the seat you are prompted with some guis, which work, then, when you click the last gui, it calls the function begin game() boat is under workspace ; Local Script under StarterPlayerScripts the server fails to move the position of the boat on seated.
--// Variables \\--
local part = game.Workspace.Part
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
local character = script.Parent
local Humanoid
local SeatPart = game.Workspace.boat.Seat
local boat = game.Workspace:WaitForChild("boat")
local realboat = boat["the boat"]
local boatoars = boat["paddle a.k.a oar"]
--gui variable
local eGui = plr.PlayerGui:WaitForChild("pressEgui"):WaitForChild("eGui")
local basic = plr.PlayerGui:WaitForChild("ChooseDifficulty"):WaitForChild("BasicButton")
local EX = plr.PlayerGui:WaitForChild("ChooseDifficulty"):WaitForChild("EX")
--// Actions \\-
function begingame()
wait(2)
if SeatPart.Occupant:IsA("Humanoid") then
local cloneboat = boat:Clone()
wait()
cloneboat.realboat.Position = Vector3.new(-276.556, -11.035, -306.986)
cloneboat.boatoars.Position = Vector3.new(-277.116, -11.279, -308.981)
cloneboat.SeatPart.Position = Vector3.new(-277.598, -10.663, -312.152)
if not SeatPart.Occupant:IsA("Humanoid") then
print("Nope")
end
if cloneboat.realboat.Position == Vector3.new(-276.556, -11.035, -306.986) then
end
end
end
part.Touched:Connect(function()
plr.Character.Humanoid.Seated:Connect(function()
if SeatPart.Occupant:IsA("Humanoid") then
eGui.Visible = true
if eGui.Visible then
mouse.KeyDown:Connect(function(Key)
if Key == "e" or "Y" then
eGui.Visible = false
wait(.5)
basic.Visible = true
if basic.Visible == true then
basic.MouseButton1Click:Connect(function()
EX.Visible = false
basic.Visible = false
begingame() -- Originally described as the first function "Yay we started the game!"
end)
end
end
end)
end
end
end)
end)
