local RaftBoughtValue = Player.IsRaftBought.IsRaftBoughtValue.Value
***if RaftBoughtValue == false and Player.leaderstats.gold.Value >= 50 then
RaftBoughtValue = true
end***
if RaftBoughtValue == true then
Player.leaderstats.gold.Value = Player.leaderstats.gold.Value - game.ReplicatedStorage.Boats.Raft.Price.Value
end
if BoatNearby == false and Player.IsRaftBought.IsRaftBoughtValue.Value == true then
local raft = game.ReplicatedStorage.Boats.Raft:Clone()
raft.Parent = workspace
raft:WaitForChild("Body").Position = Vector3.new(-8.077, -1.008, -125.226)
raft:MakeJoints()
end
BoatNearby = false
end)
I have all values set up in the explorer and a data store ready for the boolValue. A click detector function has also been made.
