This is what im trying to do but of course I coded it wrong because it doesn’t work does anyone know how I can do this
The player who owns the game pass will receive a trail in their player “Head” and id like them to have the option of disabling and enabling it using a button does anyone know a code that will work for this
-- local script
function Click() -- main function
local lp = game.Players.LocalPlayer -- local player
local char = lp.Character or lp.CharacterAdded:Wait() -- get player's character
char:WaitForChild("Head").Trail.Enabled = not char.Head.Trail.Enabled -- enable/disable
end
script.Parent.MouseButton1Click:Connect(Click) -- connect