Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why won't my boolValue change even though it takes away gold from the player?

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.

1 answer

Nevermind I fixed it 2 minutes after posting this.

This discussion is preserved as it was. New answers, comments, and votes are closed.