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

how do i make the script find this kart that has players name?

while wait(3) do
    local player = game.Players.LocalPlayer
    local Name = player.name
    local Fuel = Name.."GoKart".DriveSeat.Fuel.Value
    script.Parent.Liters.Text = tostring(Fuel).."L"
end

2 comments

0

We need more context

0

You made a typo on line 3. It's supposed to be "player.Name", not "player.name".

1 answer

I really have no idea what you're talking about, but w/e. This clones a cart for the player, assuming there is an instance in ServerStorage called "Cart". (This is a serverscript)

game:GetService("Players").PlayerAdded:Connect(function(player)
	local cart = game:GetService("ServerStorage"):WaitForChild("Cart"):Clone()
	cart.Parent = workspace
	cart.Name = player.Name .. "Cart"
	cart:SetPrimaryPartCFrame(CFrame.new(player.Character.Torso.Position + Vector3.new(0,5,0)))
end)

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