So for starters, I'm using a normal script, inside the trampoline. The trampoline power is a string value also inside the trampoline, and its number value is 100. The code is down below, please help x.x

TrampolinePow = script.Parent.Power.Value

function onTouched(part)

if part~=nil and script.Parent.Transparency == 0 and script.Parent.CanCollide == true then

part.Velocity=Vector3.new(0,TrampolinePow,-25)

wait(0.1)

end

end

script.Parent.Touched:connect(onTouched)

4 comments

0

I would recommend putting your code into a code block.

0

CODE BLOCKS PLEASE. "The trampoline power is a string value also inside the trampoline, and its number value is 100." That makes no sense.

0

If the part was touched then "part" wouldn't be nil

0

Change TrampolinePow to local