Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

The trampoline works while testing in studio, but not in game?

Asked by 6 years ago
Edited 6 years ago

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)

0
I would recommend putting your code into a code block. BunnyFilms1 297 — 6y
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. F4ULT1NTH3D4T4 226 — 6y
0
If the part was touched then "part" wouldn't be nil PolyyDev 214 — 6y
0
Change TrampolinePow to local ThePhantomG 30 — 6y

Answer this question